Part Number Hot Search : 
TB62716F M74HC SV40114 6030554 5KE33A BAV70 2SC1213D TC144E
Product Description
Full Text Search
 

To Download TMP92CM27 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 TOSHIBA Original CMOS 32-Bit Microcontroller
TLCS-900/H1 Series
TMP92CM27
Semiconductor Company
Preface
Thank you very much for making use of Toshiba microcomputer LSIs. Before use this LSI, refer the section, "Points of Note and Restrictions".
TMP92CM27
CMOS 32-bit Micro-controller
TMP92CM27FG 1. Outline and Device Characteristics
TMP92CM27 is high-speed advanced 32-bit micro-controller developed for controlling equipment which processes mass data. TMP92CM27 is a micro-controller which has a high-performance CPU (TLCS-900/H1 CPU) and various built-in I/Os. TMP92CM27FG is housed in a 144-pin flat package. Device characteristics are as follows: (1) CPU : 32-bit CPU(TLCS-900/H1 CPU) * Compatible with TLCS-900/L1 instruction code * 16Mbytes of linear address space * General-purpose register and register banks * Micro DMA : 8channels (250ns/4bytes at fc = 40MHz, best case) (2) Minimum instruction execution time : 50ns(at fc=40MHz) (3) Internal memory * Internal RAM : 32K-byte (32-bit 1 clock access and program execution are possible) * Internal ROM : None (4) External memory expansion * Expandable up to 16M bytes (shared program/data area) * Can simultaneously support 8/16-bit width external data bus ... Dynamic data bus sizing * Separate bus system (5) Memory controller * Chip select output : 6 channels
030619EBP1
* * *
*
* * *
The information contained herein is subject to change without notice. The information contained herein is presented only as a guide for the applications of our products. No responsibility is assumed by TOSHIBA for any infringements of patents or other rights of the third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of TOSHIBA or others. TOSHIBA is continually working to improve the quality and reliability of its products. Nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulnerability to physical stress. It is the responsibility of the buyer, when utilizing TOSHIBA products, to comply with the standards of safety in making a safe design for the entire system, and to avoid situations in which a malfunction or failure of such TOSHIBA products could cause loss of human life, bodily injury or damage to property. In developing your designs, please ensure that TOSHIBA products are used within specified operating ranges as set forth in the most recent TOSHIBA products specifications. Also, please keep in mind the precautions and conditions set forth in the "Handling Guide for Semiconductor Devices," or "TOSHIBA Semiconductor Reliability Handbook" etc. The TOSHIBA products listed in this document are intended for usage in general electronics applications (computer, personal equipment, office equipment, measuring equipment, industrial robotics, domestic appliances, etc.). These TOSHIBA products are neither intended nor warranted for usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or failure of which may cause loss of human life or bodily injury ("Unintended Usage"). Unintended Usage include atomic energy control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, combustion control instruments, medical instruments, all types of safety devices, etc.. Unintended Usage of TOSHIBA products listed in this document shall be made at the customer's own risk. The products described in this document are subject to the foreign exchange and foreign trade laws. TOSHIBA products should not be embedded to the downstream products which are prohibited to be produced and sold, under any law and regulations. For a discussion of how the reliability of microcontrollers can be predicted, please refer to Section 1.3 of the chapter entitled Quality and Reliability Assurance/Handling Precautions. Purchase of TOSHIBA I2C components conveys a license under the Philips I2C Patent Rights to use these components in an I2C system, provided that the system conforms to the I2C Standard Specification as defined by Philips.
92CM27-1
2005-04-20
TMP92CM27
(6) 8-bit timers : 8 channels (7) 16-bit timers : 6 channels (8) Pattern generator : 2 channels (9) General-purpose serial interface : 4 channels * UART/Synchronous mode : 4 channels (ch.0 to ch.3) * IrDA Ver.1.0(115kbps) mode selectable : 1 channels (ch.0) (10) Serial bus interface : 2 channels * I C bus mode/clock synchronous mode selectable
2
(11) High Speed serial interface : 2 channels (12) SDRAM controller : 1 channels * Supported 16M, 64M-bit SDR (Single Data Rate)-SDRAM * Supported not only operate as RAM and Data for LCD display but also programming directly from SDRAM (13) 10-bit AD converter : 12 channels (14) 8-bit DA converter : 2 channels (15) Watchdog timer (16) Key-on wake up (only for HALT release) : 8 channels (17) Interrupts : 71 interrupts * 9 CPU interrupts : Software interrupt instruction and illegal instruction * 49 internal interrupts : Seven selectable priority levels * 13 external interrupts(INT0 to INTB, NMI ) : Seven selectable priority levels (INT0 to INTB) ( INT0 to INTB are selectable edge or level interrupt ) (18) External bus release function (19) Input/output ports : 83 pins (20) Stand-by function * Three Halt modes : Idle2 (programmable), Idle1, Stop (21) Clock controller * Clock doubler (PLL) : fc = fOSCHx4 (fc=40MHz @ fOSCH=10MHz) * Clock gear function : Select a High-frequency clock fc to fc/16 (22) Operating voltage * VCC = 3.0 V to 3.6 V (fc max = 40MHz) (23) Package * 144 pin QFP : P-LQFP144-1616-0.40C
92CM27-2
2005-04-20
TMP92CM27
AVCC/VREFH AVSS/VREFL (PM0 to PM7)AN0 to AN7 /KI0 to KI7 (PN0 to PN2)AN8 to AN10 (PN3)AN11/ ADTRG DAVCC/DAREF DAVSS DAOUT0 DAOUT1 (PA0)RXD0 (PA1)TXD0 (PA2)SCLK0/ CTS0 (PA3)RXD1 (PA4)TXD1 (PA5)SCLK1/ CTS1 (PD3)RXD2 (PD4)TXD2 (PD5)SCLK2/ CTS2
10-Bit 12CH AD Converter
TLCS-900/H1
XWA XBC XDE XHL XIX XIY XIZ XSP W B D H IX IY IZ SP 32bit SR PC F A C E L
DVCC[4] DVSS[4]
Mode Controller PLL H-OSC Clock Gear
RESET
AM0 AM1
8-Bit 2CH DA Converter Serial I/O (Ch.0) Serial I/O (Ch.1) Serial I/O (Ch.2) Serial I/O (Ch.3)
X1 X2
Watchdog Timer (WDT)
Port0 Port1 Port4 Port5 Port6
D0 to D7 D8 to D15(P10 to P17)
Memory Controller (6-Blocks)
A0 to A7 A8 to A15 A16 to A23(P60 to P67)
(PL0)PG00/RXD3 (PL1)PG01/TXD3 (PL2)PG02/SCLK3/ CTS3 (PL3)PG03/TA7OUT (PL4)PG10/HSSI1 (PL5)PG11/HSSO1 (PL6)PG12/HSCLK1 (PL7)PG13 (PD0)HSSI0 (PD1)HSSO0 (PD2)HSCLK0
PATTERN GENERATOR (ch.0) PATTERN GENERATOR (ch.1) HIGH SPEED SIO (Ch.0) HIGH SPEED SIO (Ch.1)
Key-on Wake up
Port7
RD WRLL (P71) WRLU (P72) R/ W (P73) SRWR (P74) SRLLB (P75) SRLUB (P76) WAIT (P77)
32-KB RAM
Port8
CS0 (P80) CS1 (P81) CS2 (P82) CS3 / SDCS (P83) CS4 (P84) CS5 / WDTOUT (P85) BUSRQ (P86) BUSAK (P87)
(PC0)SO0/SDA0 (PC1)SI0/SCL0 (PC2)SCK0 (PC3)SO1/SDA1 (PC4)SI1/SCL1 (PC5)SCK1 (PK0)TB0IN0/INT4 (PK1)TB0IN1/INT5 (PJ0)TB0OUT0 (PJ1)TB0OUT1 (PK2)TB1IN0/INT6 (PK3)TB1IN1/INT7 (PJ2)TB1OUT0 (PJ3)TB1OUT1 (PK4)TB2IN0/INT8 (PK5)TB2IN1/INT9 (PJ4)TB2OUT0/TB4OUT0 (PJ5)TB2OUT1/TB4OUT1 (PK6)TB3IN0/INTA (PK7)TB3IN1/INTB (PJ6)TB3OUT0/TB5OUT0 (PJ7)TB3OUT1/TB5OUT1
Serial Bus I/F (Ch.0) Serial Bus I/F (Ch.1) 16-Bit Timer (TMRB0) 16-Bit Timer (TMRB1) 16-Bit Timer (TMRB2) 16-Bit Timer (TMRB3) 16-Bit Timer (TMRB4) 16-Bit Timer (TMRB5)
SDRAMC
SDLLDQM(P93) SDLUDQM(P94) SDCKE(P95) SDCLK(P96)
SDWE (P90) SDRAS (P91) SDCAS (P92)
Interrupt Controller
8-Bit Timer(TMRA0) 8-Bit Timer(TMRA1) 8-Bit Timer(TMRA2) 8-Bit Timer(TMRA3) 8-Bit Timer(TMRA4) 8-Bit Timer(TMRA5) 8-Bit Timer(TMRA6) 8-Bit Timer(TMRA7)
NMI
TA0IN/INT0(PF0) TA1OUT(PF1) TA2IN/INT1(PF2) TA3OUT(PF3) TA4IN/INT2(PF4) TA5OUT(PF5) TA6IN/INT3(PF6)
Figure 1.1 TMP92CM27 block diagram
92CM27-3
2005-04-20
TMP92CM27
2. Pin assignment and pin functions
The assignment of input/output pins for the TMP92CM27, their names and functions are as follows:
2.1 Pin assignment Diagram
Figure 2.1.1 shows the pin assignment of the TMP92CM27FG.
DVSS A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 P60,A16 P61,A17 P62,A18 P63,A19 P64,A20 P65,A21 P66,A22 P67,A23 P17,D15 P16,D14 P15,D13 P14,D12 P13,D11 P12,D10 P11,D9
P10,D8
115
D4 D3
D7 D6 D5
125
135
140
130
120
110
D2 D1 D0 DVCC
DVCC A5 A4 A3 A2 A1 A0 PC5,SCK1 PC4,SI1,SCL1 PC3,SO1,SDA1 PC2,SCK0 PC1,SI0,SCL0 PC0,SO0,SDA0 P96,SDCLK P95,SDCKE P94,SDLUDQM P93,SDLLDQM P92, SDCAS P91, SDRAS P90, SDWE DAVSS DAOUT1 DAOUT0 DAVCC/DAREF PN3,AN11, ADTRG PN2,AN10 PN1,AN9 PN0,AN8 PM7,AN7,KI7 PM6,AN6,KI6 PM5,AN5,KI5 PM4,AN4,KI4 PM3,AN3,KI3 PM2,AN2,KI2 PM1,AN1,KI1 PM0,AN0,KI0
1
DVSS
RD
105 5
100 10
95 15
TMP92CM27FG
QFP144
90 20
TOPVIEW
85 25
80 30
75 40 60 65 50 45 55 35 70
P71, WRLL P72, WRLU P73,R/ W P74, SRWR P75, SRLLB P76, SRLUB P77, WAIT P80, CS0 P81, CS1 P82, CS2 P83, CS3 , SDCS P84, CS4 P85, CS5 , WDTOUT P86, BUSRQ P87, BUSAK PL7,PG13 PL6,PG12,HSCLK1 PL5,PG11,HSSO1 PL4,PG10,HSSI1 PL3,PG03,TA7OUT PL2,PG02,SCLK3, CTS3 PL1,PG01,TXD3 PL0,PG00,RXD3 PA5,SCLK1, CTS1 PA4,TXD1 PA3,RXD1 PA2,SCLK0, CTS0 PA1,TXD0 PA0,RXD0 PD5,SCLK2, CTS2 PD4,TXD2 PD3,RXD2 PD2,HSCLK0 PD1,HSSO0
AVSS/VREFL AVCC/VREFH PK7,TB3IN1,INTB PK6,TB3IN0,INTA PK5,TB2IN1,INT9 PK4,TB2IN0,INT8 PK3,TB1IN1,INT7 PK2,TB1IN0,INT6 PK1,TB0IN1,INT5 PK0,TB0IN0,INT4 PJ7,TB3OUT1,TB5OUT1 PJ6,TB3OUT0,TB5OUT0 PJ5,TB2OUT1,TB4OUT1 PJ4,TB2OUT0,TB4OUT0 PJ3,TB1OUT1 PJ2,TB1OUT0 PJ1,TB0OUT1 PJ0,TB0OUT0 PF6,TA6IN,INT3 PF5,TA5OUT PF4,TA4IN,INT2 PF3,TA3OUT PF2,TA2IN,INT1 PF1,TA1OUT PF0,TA0IN,INT0 DVCC X1 DVSS X2 AM1 RESET AM0 DVSS NMI DVCC PD0,HSSI0
Figure 2.1.1 Pin assignment diagram (144 pin LQFP)
92CM27-4
2005-04-20
TMP92CM27
2.2 Pin names and functions
The following table shows the names and functions of the input/output pins Table 2.2.1 Pin names and functions (1/5)
Pin name D0 to D7 P10 to P17 D8 to D15 A0 to A7 A8 to A15 P60 to P67 A16 to A23
RD P71
Number of Pin 8 8 8 8 8
1
I/O I/O I/O I/O Output Output I/O Output
Output
Function Data: Data bus D0 to D7 Port 1: I/O port Input or output specifiable in units of bits Data: Data bus D8 to D15 Address: Address bus A0 to A7 Address: Address bus A8 to A15 Port 6: I/O port Address: Address bus A16 to A23
Read: Outputs strobe signal for read external memory (with pull-up register)
1
1 1 1 1 1 1 1 1 1 1
WRLL P72
WRLU P73 R/ W P74 SRWR P75 SRLLB P76 SRLUB P77 WAIT P80 CS0 P81 CS1 P82 CS2 P83 CS3 SDCS P84 CS4 P85 CS5 WDTOUT P86 BUSRQ P87 BUSAK 1 1 1 1
I/O Output
I/O Output I/O Output I/O Output I/O Output I/O Output I/O Input Output Output Output Output Output Output Output Output Output Output Output Output Output Output I/O Input I/O Output
Port 71: I/O port (Schmitt input, with pull-up register) Write: Output strobe signal for writing data on pins D0 to D7
Port 72: I/O port (schmitt input, with pull-up register) Write: Output strobe signal for writing data on pins D8 to D15 Port 73: I/O port (schmitt input) Read/Write: 1 represents read or dummy cycle; 0 represents write cycle Port 74: I/O port (Schmitt input, with pull-up register) Write enable for SRAM: Strobe signal for writing data Port 75: I/O port (Schmitt input, with pull-up register) Data enable for SRAM on pins D0 to D7 Port 76: I/O port (Schmitt input, with pull-up register) Data enable for SRAM on pins D8 to D15 Port 77: I/O port (Schmitt input) Wait: Signal used to request CPU bus wait Port 80: Output port Chip select 0: Outputs "Low" when address is within specified address area Port 81: Output port Chip select 1: Outputs "Low" when address is within specified address area Port 82: Output port Chip select 2: Outputs "Low" when address is within specified address area Port 83: Output port Chip select 3: Outputs "Low" when address is within specified address area Chip select for SDRAM: Outputs "Low" when address is within SDRAM address area Port 84: Output port Chip select 4: Outputs "Low" when address is within specified address area Port 85: Output port Chip select 5: Outputs "Low" when address is within specified address area Watchdog timer output pin Port 86: I/O port (Schmitt input) Bus request: request pin that set external memory bus to high-impedance (for External DMAC) Port 87: I/O port (Schmitt input) Bus acknowledge: this pin show that external memory bus pin is set to high-impedance by receiving BUSRQ (for External DMAC)
92CM27-5
2005-04-20
TMP92CM27
Table 2.2.2 Pin names and functions (2/5)
Pin name P90 SDWE P91 SDRAS P92 SDCAS P93 SDLLDQM P94 SDLUDQM P95 SDCKE P96 SDCLK PA0 RXD0 PA1 TXD0 PA2 SCLK0 CTS0 PA3 RXD1 PA4 TXD1 PA5 SCLK1 CTS1 PC0 SO0 SDA0 PC1 SI0 SCL0 PC2 SCK0 PC3 SO1 SDA1 PC4 SI1 SCL1 PC5 SCK1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Number of Pin 1 I/O Output Output Output Output Output Output Output Output Output Output Output Output Output Output I/O Input I/O Output I/O I/O Input I/O Input I/O Output I/O I/O Input I/O Output I/O I/O Input I/O I/O I/O I/O Output I/O I/O Input I/O I/O I/O Port 90: Output port Write enable for SDRAM Port 91: Output port Row address strobe for SDRAM Port 92: Output port Column address strobe for SDRAM Port 93: Output port Data enable for SDRAM on pins D0 to D7 Port 94: Output port Data enable for SDRAM on pins D8 to D15 Port 95: Output port Clock enable for SDRAM Port 96: Output port Clock for SDRAM Port A0: I/O port (Schmitt input) Serial 0 receive data Port A1: I/O port (Schmitt input) Serial 0 send data: Open-drain output programmable Port A2: I/O port (Schmitt input) Serial 0 clock I/O Serial 0 data send enable (Clear To Send) Port A3: I/O port (Schmitt input) Serial 1 receive data Port A4: I/O port (Schmitt input) Serial 1 send data: Open-drain output programmable Port A5: I/O port (Schmitt input) Serial 1 clock I/O Serial 1 data send enable (Clear To Send) Port C0: I/O port (Schmitt input) Serial bus interface 0 send data at SIO mode Serial bus interface 0 send/receive data at I2C mode Open-drain output programmable Port C1: I/O port (Schmitt input) Serial bus interface 0 receive data at SIO mode Serial bus interface 0 clock I/O data at I2C mode Open-drain output programmable Port C2: I/O port (Schmitt input) Serial bus interface 0 clock I/O data at SIO mode Port C3: I/O port (Schmitt input) Serial bus interface 1 send data at SIO mode Serial bus interface 1 send/receive data at I2C mode Open-drain output programmable Port C4: I/O port (Schmitt input) Serial bus interface 1 receive data at SIO mode Serial bus interface 1 clock I/O data at I2C mode Open-drain output programmable Port C5: I/O port (Schmitt input) Serial bus interface 1 clock I/O data at SIO mode Function
92CM27-6
2005-04-20
TMP92CM27
Table 2.2.3 Pin names and functions (3/5)
Pin name PD0 HSSI0 PD1 HSSO0 PD2 HSCLK0 PD3 RXD2 PD4 TXD2 PD5 SCLK2 CTS 2 PF0 TA0IN INT0 PF1 TA1OUT PF2 TA2IN INT1 PF3 TA3OUT PF4 TA4IN INT2 PF5 TA5OUT PF6 TA6IN INT3 PJ0 TB0OUT0 PJ1 TB0OUT1 PJ2 TB1OUT0 PJ3 TB1OUT1 PJ4 TB2OUT0 TB4OUT0 PJ5 TB2OUT1 TB4OUT1 PJ6 TB3OUT0 TB5OUT0 PJ7 TB3OUT1 TB5OUT1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Number of Pin 1 I/O I/O Input I/O Output I/O Output I/O Input I/O Output I/O I/O Input I/O Input Input I/O Output I/O Input Input I/O Output I/O Input Input I/O Output I/O Input Input I/O Output I/O Output I/O Output I/O Output I/O Output Output I/O Output Output I/O Output Output I/O Output Output Port D0: I/O port High speed Serial 0 receive data Port D1: I/O port (Schmitt input) High speed Serial 0 send data Port D2: I/O port (Schmitt input) High speed Serial 0 clock I/O Port D3: I/O port (Schmitt input) Serial 2 receive data Port D4: I/O port (Schmitt input) Serial 2 send data: Open-drain output programmable Port D5: I/O port (Schmitt input) Serial 2 clock I/O Serial 2 data send enable (Clear To Send) Port F0: I/O port (Schmitt input) 8-bit timer 0 input: Input pin of 8-bit timer TMRA0 Interrupt request pin 0: Interrupt request pin with programmable level/rising/falling edge Port F1: I/O port (Schmitt input) 8-bit timer 1 output: Output pin of 8-bit timer TMRA0 or TMRA1 Port F2: I/O port (Schmitt input) 8-bit timer 2 input: Input pin of 8-bit timer TMRA2 Interrupt request pin 1: Interrupt request pin with programmable level/rising/falling edge Port F3: I/O port (Schmitt input) 8-bit timer 3 output: Output pin of 8-bit timer TMRA2 or TMRA3 Port F4: I/O port (Schmitt input) 8-bit timer 4 input: Input pin of 8-bit timer TMRA4 Interrupt request pin 2: Interrupt request pin with programmable level/rising/falling edge Port F5: I/O port (Schmitt input) 8-bit timer 5 output: Output pin of 8-bit timer TMRA4 or TMRA5 Port F6: I/O port (Schmitt input) 8-bit timer 6 input: Input pin of 8-bit timer TMRA6 Interrupt request pin 3: Interrupt request pin with programmable level/rising/falling edge Port J0: I/O port (Schmitt input) 16-bit timer 0 output 0: Output pin of 16-bit timer TMRB0 Port J1: I/O port (Schmitt input) 16-bit timer 0 output 1: Output pin of 16-bit timer TMRB0 Port J2: I/O port (Schmitt input) 16-bit timer 1 output 0: Output pin of 16-bit timer TMRB1 Port J3: I/O port (Schmitt input) 16-bit timer 1 output 1: Output pin of 16-bit timer TMRB1 Port J4: I/O port (Schmitt input) 16-bit timer 2 output 0: Output pin of 16-bit timer TMRB2 16-bit timer 4 output 0: Output pin of 16-bit timer TMRB4 Port J5: I/O port (Schmitt input) 16-bit timer 2 output 1: Output pin of 16-bit timer TMRB2 16-bit timer 4 output 1: Output pin of 16-bit timer TMRB4 Port J6: I/O port (Schmitt input) 16-bit timer 3 output 0: Output pin of 16-bit timer TMRB3 16-bit timer 5 output 0: Output pin of 16-bit timer TMRB5 Port J7: I/O port (Schmitt input) 16-bit timer 3 output 1: Output pin of 16-bit timer TMRB3 16-bit timer 5 output 1: Output pin of 16-bit timer TMRB5 Function
92CM27-7
2005-04-20
TMP92CM27
Table 2.2.4 Pin names and functions (4/5)
Pin name PK0 TB0IN0 INT4 PK1 TB0IN1 INT5 PK2 TB1IN0 INT6 PK3 TB1IN1 INT7 PK4 TB2IN0 INT8 PK5 TB2IN1 INT9 PK6 TB3IN0 INTA PK7 TB3IN1 INTB PL0 PG00 RXD3 PL1 PG01 TXD3 PL2 PG02 SCLK3 CTS3 PL3 PG03 TA7OUT PL4 PG10 HSSI1 PL5 PG11 HSSO1 PL6 PG12 HSCLK1 PL7 PG13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Number of Pin 1 I/O Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input I/O Output Input I/O Output Output I/O Output I/O Input I/O Output Output I/O Output Input I/O Output Output I/O Output Output I/O Output Port K0: Input port (Schmitt input) 16-bit timer 0 input 0: Input of count/capture trigger in 16-bit TMRB0 Interrupt request pin 4 : Interrupt request pin with programmable level/rising/falling edge Port K1: Input port (Schmitt input) 16-bit timer 0 input 1: Input of count/capture trigger in 16-bit TMRB0 Interrupt request pin 5 : Interrupt request pin with programmable level/rising/falling edge Port K2: Input port (Schmitt input) 16-bit timer 1 input 0: Input of count/capture trigger in 16-bit TMRB1 Interrupt request pin 6 : Interrupt request pin with programmable level/rising/falling edge Port K3: Input port (Schmitt input) 16-bit timer 1 input 1: Input of count/capture trigger in 16-bit TMRB1 Interrupt request pin 7 : Interrupt request pin with programmable level/rising/falling edge Port K4: Input port (Schmitt input) 16-bit timer 2 input 0: Input of count/capture trigger in 16-bit TMRB2 Interrupt request pin 8 : Interrupt request pin with programmable level/rising/falling edge Port K5: Input port (Schmitt input) 16-bit timer 2 input 1: Input of count/capture trigger in 16-bit TMRB2 Interrupt request pin 9 : Interrupt request pin with programmable level/rising/falling edge Port K6: Input port (Schmitt input) 16-bit timer 3 input 0: Input of count/capture trigger in 16-bit TMRB3 Interrupt request pin A : Interrupt request pin with programmable level/rising/falling edge Port K7: Input port (Schmitt input) 16-bit timer 3 input 1: Input of count/capture trigger in 16-bit TMRB3 Interrupt request pin B : Interrupt request pin with programmable level/rising/falling edge Port L0: I/O port (Schmitt input) Pattern generator output 00 Serial 3 receive data Port L1: I/O port (Schmitt input) Pattern generator output 01 Serial 3 send data: Open-drain output programmable Port L2: I/O port (Schmitt input) Pattern generator output 02 Serial 3 clock I/O Serial 3 data send enable (Clear To Send) Port L3: I/O port (Schmitt input) Pattern generator output 03 8-bit timer 7 output: Output pin of 8-bit timer TMRA6 or TMRA7 Port L4: I/O port Pattern generator output 10 High speed Serial 1 receive data Port L5: I/O port (Schmitt input) Pattern generator output 11 High speed Serial 1 send data Port L6: I/O port (Schmitt input) Pattern generator output 12 High speed Serial 1 clock I/O Port L7: I/O port (Schmitt input) Pattern generator output 13 Function
92CM27-8
2005-04-20
TMP92CM27
Table 2.2.5 Pin names and functions (5/5)
Pin name PM0 to PM7 AN0 to AN7 KI0 to KI7 PN0 to PN3 AN8 to AN11 ADTRG NMI DAOUT0 DAOUT1 AM0, AM1 1 1 1 2 Input Output Output Input 4 Input Number of Pin 8 I/O Input Port M: Input port (Schmitt input) Analog input 0 to 7: Pin used to input to AD converter Key input 0 to 7: Pin used of Key-on wakeup 0 to 7 Port N: Input port (Schmitt input) Analog input 8 to 11: Pin used to input to AD converter AD trigger: Signal used for request AD start (Shared with PN3) Non-maskable interrupt request pin: Interrupt request pin with programmable falling edge level or with both edge levels programmable (Schmitt input) Digital output 0: Pin used to output to DA converter 0 Digital output 1: Pin used to output to DA converter 1 Operation mode: Fixed to AM1="0",AM0="1" Fixed to AM1="1",AM0="0" Fixed to AM1="1",AM0="1" Fixed to AM1="0",AM0="0" X1 / X2 RESET AVCC / VREFH AVSS / VREFL DAVCC / DAREF DAVSS DVCC DVSS 1 4 4 Input 2 1 1 1 1 I/O Input Input Input Input External 16-bit bus start External 8-bit bus start Reserved Reserved Function
High-frequency oscillator connection I/O pins Reset: Initializes TMP92CM27 (Schmitt input, with pull-up register) Pin used to both power supply pin for AD converter and standard power supply for AD converter (H) Pin used to both GND pin for AD converter (0V) and standard power supply pin for AD converter (L) Pin used to both power supply pin for DA converter and standard power supply for DA converter Pin used to both GND pin for DA converter (0V) Power supply pin (All DVCC pins should be connected with the power supply pin) GND pins (0V) (All DVSS pins should be connected with GND (0V))
-
92CM27-9
2005-04-20
TMP92CM27
3.
Operation
This section describes the basic components, functions and operation of the TMP92CM27.
3.1 CPU
The TMP92CM27 contains an advanced high-speed 32-bit CPU (TLCS-900/H1 CPU)
3.1.1
CPU Outline
TLCS-900/H1 CPU is high-speed and high-perforrmance CPU based on TLCS-900/L1 CPU.TLCS-900/H1 CPU has expanded 32-bit internal data bus to process instructions more quickly. Outline is as follows: Table 3.1.1 TMP92CM27 Outline Parameter Width of CPU address bus Width of CPU data bus Internal operating frequency Minimum bus cycle Internal RAM TMP92CM27 24 bits 32 bits Max 20MHz 1-clock access (50ns at fSYS = 20MHz) 32-bit 1-clock access CGEAR, INTC, PORT, MEMC, 8-bit, TMRA, TMRB, PG, SIO, SBI, 2-clock SDRAMC, ADC, DAC, WDT access 16-bit, HSIO 2-clock access 8 ro 16-bit 2-clock access (can insert some waits) 16-bit 1-clock access 1-clock(50ns at fSYS = 20MHz) 2-clock(100ns at fSYS = 20MHz) 12 bytes Compatible with TLCS-900/L1 (LDX instruction is deleted) Only maximum mode 8 channel
Internal I/O
External memory (SRAM etc) External memory (SDRAM) Minimum instruction Execution cycle Conditional jump Instruction queue buffer Instruction set CPU mode Micro DMA
92CM27-10
2005-04-20
TMP92CM27
3.1.2
Reset Operation
When resetting the TMP92CM27, ensure that the power supply voltage is within the operating voltage range, and that the internal high-frequency oscillator has stabilized. Then hold the RESET input low for at least 20 system clocks (16 s at fc = 40 MHz). At reset, since the clock doubler (PLL) is bypassed and clock-gear is set to 1/16, system clock operates at 1.25 MHz (fc = 40 MHz). When the reset has been accepted, the CPU performs the following: * Sets the program counter (PC) as follows in accordance with the reset vector stored at address FFFF00H to FFFF02H: PC<7:0> PC<15:8> PC<23:16> * * * data in location FFFF00H data in location FFFF01H data in location FFFF02H
Sets the stack pointer (XSP) to 00000000H. Sets bits of the status register (SR) to "111" (thereby setting the interrupt level mask register to level 7). Clears bits of the status register to "00" (there by selecting register bank 0).
When the reset is released, the CPU starts executing instructions according to the program counter settings. CPU internal registers not mentioned above do not change when the reset is released. When the reset is accepted, the CPU sets internal I/O, ports and other pins as follows. * * Initializes the internal I/O registers as table of "special function register" in section 5. Sets the port pins, including the pins that also act as internal I/O, to general-purpose input or output port mode.
Internal reset is released as soon as external reset is released. The operation of memory controller cannot be insured until power supply becomes stable after power-on reset. The external RAM data provided before turning on the TMP92CM27 may be spoiled because the control signals are unstable until power supply becomes stable after power-on reset.
VCC (3.3 V)
RESET
High-frequency oscillation stabilized time +20 system clock
0 s (Min)
Figure 3.1.1 Power on Reset Timing Example
92CM27-11
2005-04-20
TMP92CM27
3.1.3
Setting of AM0 and AM1
Set AM1 and AM0 pins like Table 3.1.2 according to system usage. Table 3.1.2 Operation Mode Setup Table
Operation mode
16-bit external bus start (Multi 16 Mode) 8-bit external bus start (Multi 8 Mode) Reserved RESET
Mode Setup Input Pin AM1 AM0
0 1 1 0
1
1
Reserved
0
0
92CM27-12
2005-04-20
TMP92CM27
3.2 Memory Map
Figure 3.2.1 is a memory map of the TMPP92CM27.
000000H
Internal I/O (8 K bytes)
Direct area (n)
000100H 64-K byte area (nn)
002000H Internal RAM (32 K bytes) 00A000H 010000H
External memory
F00000H
Provisional emulator control (64K bytes)
(Note 1) 16-M byte area (R) (-R) (R+) (R + R8/16) (R + d8/16) (nnn)
F10000H
External memory
FFFF00H FFFFFFH
Vector table (256 bytes)
(Note 2) ( = Internal area)
Figure 3.2.1 Memory Map
Note 1: Provisional emulator control area is for an emulator, it is mapped F00000H to F0FFFFH after reset. On emulator WR signal and RD signal are asserted, when this area is accessed. Be carefull to use external memory. Note 2: Don't use the last 16-bytes area (FFFFF0H to FFFFFFH). This area is reserved for an emulator.
92CM27-13
2005-04-20
TMP92CM27
3.3
Clock Function and Stand-by Function
TMP92CM27 contains (1) clock gear, (2) clock doubler (PLL), (3) stand-by controller and (4) noise reducing circuit. They are used for low power, low noise systems. This chapter is organized as follows: 3.3.1 Block diagram of system clock 3.3.2 SFR 3.3.3 System clock controller 3.3.4 Clock doubler (PLL) 3.3.5 Noise reducing circuits 3.3.6 Stand-by controller
92CM27-14
2005-04-20
TMP92CM27
The clock operating modes are as follows: (a) single clock mode (X1, X2 pins only), (b) dual clock mode (X1, X2 pins and PLL). Figure 3.3.1 shows a transition figure.
Reset (fOSCH/32) Release reset NORMAL mode (fOSCH/gear value/2) Instruction Interrupt STOP mode (Stops all circuits)
IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator)
Instruction Interrupt Instruction Interrupt (a)
Single clock mode transition figure Reset (fOSCH/32) Release reset Instruction NORMAL mode Interrupt (fOSCH/gear value/2) Instruction Note
IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator)
Instruction Interrupt Instruction Interrupt Instruction Interrupt Instruction Interrupt (b)
STOP mode (Stops all circuits)
NORMAL mode (4x fOSCH/gear value/2) Dual clock mode transition figure
Note 1:
If you shift from NORMAL mode with use of PLL to NORMAL mode, execute following setting in the same order. 1) Change CPU clock (PLLCR0 "0") 2) Stop PLL circuit (PLLCR1 "0")
Note 2:
It's prohibited to shift from NORMAL mode with use of PLL to STOP mode directly. You should set NORMAL mode once, and then shift to STOP mode. (You should stop high-frequency oscillator after you stop PLL.)
Figure 3.3.1 System Clock Block Diagram
The clock frequency input from the X1 and X2 pins is called fOSCH and clock frequency selected by SYSCR1 is called the system clock fFPH. The system clock fSYS is defined as the divided clock of fFPH, and one cycle of fSYS is defined to as one state.
92CM27-15
2005-04-20
TMP92CM27
3.3.1
Block Diagram of System Clock
SYSCR2 Warm-up timer (High-frequency oscillator) Lock up timer (PLL) fFPH PLLCR1, PLLCR0 fc fPLL = fOSCH x 4 Clock doubler (PLL) Selector
/2 /4
T T0 /2 /4
fc/2 fc/4 fc/8
fc/16 /8 /16
/2
fSYS
X1 X2
High-frequency oscillator fOSCH
Clock-gear PLLCR0
SYSCR1
fSYS TMRA0 to 7, TMRB0 to 5 T0
Prescaler
CPU RAM Interrupt controller SIO0 to SIO3
Prescaler
ADC I/O ports Memory controller SDRAMC DAC PG HSIO
SBI0 to SBI1 T
Prescaler
Figure 3.3.2 Block Diagram of System Clock
92CM27-16
2005-04-20
TMP92CM27
3.3.2
SYSCR0 (10E0H)
SFR
7 6 5 4 3 2
- R/W 0 Always write "0"
1
0
Bit symbol Read/Write After reset Function
7
SYSCR1 (10E1H) Bit symbol Read/Write After reset Function
6
5
4
3
2
GEAR2 1
1
GEAR1 R/W 0
0
GEAR0 0
Select gear value of high-frequency (fc) 000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 101: (Reserved) 110: (Reserved) 111: (Reserved)
7
SYSCR2 (10E2H) Bit symbol Read/Write After reset Function - R/W 0 Always write "0"
6
5
WUPTM1 R/W 1
4
WUPTM0 R/W 0
3
HALTM1 R/W 1 HALT mode 00: Reserved 01: STOP mode 10: IDLE1 mode 11: IDLE2 mode
2
HALTM0 R/W 1
1
0
DRVE R/W 0 1: The inside of STOP mode also drives a pin
Warm-up timer 00: Reserved 01: 28/input frequency 10: 214/input frequency 11: 216/input frequency
Note 1: SYSCR0 can read "1". Note 2: SYSCR0, SYSCR0, SYSCR1, and SYSCR2 can read "0".
Figure 3.3.3 SFR for System Clock
92CM27-17
2005-04-20
TMP92CM27
7
EMCCR0 (10E3H) Bit symbol Read/Write After reset Function PROTECT R 0 Protect flag 0: OFF 1: ON
6
5
4
3
2
EXTIN R/W 0 1: External clock
1
DRVOSCH R/W 1
fc oscillator driver ability 1: Normal 0: Weak
0
EMCCR1 (10E4H)
Bit symbol Read/Write After reset Function Switching the protect ON/OFF by write to following 1st-KEY, 2nd-KEY 1st-KEY: EMCCR1 = 5AH, EMCCR2 = A5H in succession write 2nd-KEY: EMCCR1 = A5H, EMCCR2 = 5AH in succession write
EMCCR2 (10E5H)
Bit symbol Read/Write After reset Function
Note 1: EMCCR0 can read "1". Note 2: EMCCR0 can read "0". Note 3: In case restarting the oscillator in the stop oscillation state (e.g. Restart the oscillator in STOP
mode), set (EMCCR0) = "1". Figure 3.3.4 SFR for System Clock
92CM27-18
2005-04-20
TMP92CM27
7
PLLCR0 (10E8H) Bit symbol Read/Write After reset Function
6
FCSEL R/W 0 Select fc clock 0: fOSCH 1: fPLL
5
LUPFG R 0 Lock up timer status flag 0: Not end 1: End
4
3
2
1
0
Note 1: Be carefull that logic of PLLCR0 is different from 900/L's DFM. Note 2: PLLCR0, can read "0".
7
PLLCR1 (10E9H) Bit symbol Read/Write After reset Function PLLON R/W 0 Control on/off 0: OFF 1: ON
6
5
4
3
2
1
0
Note 1: PLLCR1 can read "0".
Figure 3.3.5 SFR for PLL
92CM27-19
2005-04-20
TMP92CM27
3.3.3
System Clock Controller
The system clock controller generates the system clock signal (fSYS) for the CPU core and internal I/O. It contains a oscillation circuits, PLL and a clock gear circuit for high-frequency (fc) operation. The register SYSCR1 sets the high-frequency clock gear to either 1, 2, 4, 8 or 16 (fc, fc/2, fc/4, fc/8 or fc/16). These functions can reduce the power consumption of the equipment in which the device is installed. The initialization = "100" will cause the system clock (fSYS) to be set to fc/32 (fc/16 x 1/2) after reset. For example, fSYS is set to 1.25 MHz when the 40 MHz oscillator is connected to the X1 and X2 pins. (1) Clock gear controller The fFPH is set according to the contents of the clock gear select register SYSCR1 to either fc, fc/2, fc/4, fc/8 or fc/16. Using the clock gear to select a lower value of fFPH reduces power consumption. Example: Changing to a high-frequency gear
SYSCR1 EQU LD LD X: Don't care 10E1H (SYSCR1), XXXXX001B (DUMMY), 00H ; Changes fSYS to fc/2. Dummy instruction
(High-speed clock gear changing) To change the clock gear, write the register value to the SYSCR1 register. It is necessary the warm-up time until changing after writing the register value. There is the possibility that the instruction next to the clock gear changing instruction is executed by the clock gear before changing. To execute the instruction next to the clock gear switching instruction by the clock gear after changing, input the dummy instruction as follows (instruction to execute the write cycle). Example:
SYSCR1 EQU LD LD 10E1H (SYSCR1), XXXXX010B (DUMMY), 00H ; ; Changes fSYS to fc/4. Dummy instruction
Instruction to be executed after clock gear has changed
92CM27-20
2005-04-20
TMP92CM27
3.3.4
Clock Doubler (PLL)
PLL outputs the fPLL clock signal, which is four times as fast as fOSCH. It can use the low-speed-frequency oscillator, even though the internal clock is high-frequency. A reset initializes PLL to stop status, setting to PLLCR0, PLLCR1 register is needed before use. Like an oscillator, this circuit requires time to stabilize. This is called the lock up time and it is measured by 16-stage binary counter. Lock up time is about 1.6 ms at fOSCH = 10 MHz. Note 1: Input frequency limitation for PLL The limitation of input frequency (High-frequency oscillation) for PLL is following. fOSCH = 6 to 10 MHz (VCC = 3.0 to 3.6 V) Note 2: PLLCR0 The logic of PLLCR0 is different from 900/L1's DFM. Be careful to judge an end of lock up time
. The following is an setting example for PLL starting and PLL stopping. Example 1: PLL starting
PLLCR0 PLLCR1 LUP: EQU EQU LD BIT JR LD 10E8H 10E9H (PLLCR1), 1 X X X X X X X B 5, (PLLCR0) Z, LUP (PLLCR0), X 1 X X X X X X B
; ; ; ;
Enables PLL operation and starts lock up. Detects end of lock up. Changes fc from 10 MHz to 40 MHz.
X: Don't care
PLL output: fPLL Lock up timer System clock fSYS Starts PLL operation and starts lock up Changes from 10 MHz to 40 MHz Ends of lock up Counts up by fOSCH During lock up After lock up
92CM27-21
2005-04-20
TMP92CM27
Example 2: PLL stopping
PLLCR0 PLLCR1 EQU EQU LD LD 10E8H 10E9H (PLLCR0), X0XXXXXXB (PLLCR1), 0XXXXXXXB
; ;
Changes fc from 40 MHz to10 MHz. Stop PLL.
X: Don't care PLL output: fPLL System clock fSYS Changes from 40 MHz to 10 MHz Stops PLL operation
92CM27-22
2005-04-20
TMP92CM27
Limitation point on the use of PLL 1. If you stop PLL operation during using PLL, you should execute following setting in the same order.
LD LD (PLLCR0), 00H (PLLCR1), 00H ; ; Change the clock fPLLto fOSCH PLL stop
Examples of settings are below. (2) Change/stop control (OK) PLL use mode (fPLL) Set the STOP mode High-frequency oscillator operation mode (fOSCH) PLL stop Halt (High-frequency oscillator stop)
(SYSCR2), (PLLCR0), (PLLCR1), 0 X--01 X-B; X0 -XXXXXB; 0XXXXXXXB; ; Set the STOP mode (This command can execute before use of PLL) Change the system clock fPLL to fOSCH PLL stop Shift to STOP mode
LD LD LD HALT
(Error) PLL use mode (fPLL) Set the STOP mode Halt (High-frequency oscillator stop)
LD HALT (SYSCR2), 0 X--01X-B; ; Set the STOP mode (This command can execute before use of PLL) Shift to STOP mode
92CM27-23
2005-04-20
TMP92CM27
3.3.5
Noise Reduction Circuits
Noise reduction circuits are built-in, allowing implementation of the following features. (1) Reduced drivability for high-frequency oscillator (2) Single drive for high-frequency oscillator (3) SFR protection of register contents These functions need a setup by EMCCR0, EMCCR1, and EMCCR2 register. (1) to (3) is explained below. (1) Reduced drivability for high-frequency oscillator (Purpose) Reduces noise and power for oscillator when a resonator is used. (Block diagram)
fOSCH C1 Resonator X1 pin Enable oscillation EMCCR0
C2 X2 pin
(Setting method) The drive ability of the oscillator is reduced by writing "0" to EMCCR0 register. By reset, is initialized to "1" and the oscillator starts oscillation by normal drivability when the power-supply is on.
Note: This function (EMCCR0 = "0") is available to use in case of fOSCH = 6 to 10 MHz condition.
92CM27-24
2005-04-20
TMP92CM27
(2) Single drive for high-frequency oscillator (Purpose) Not need twin drive and protect mistake operation by inputted noise to X2 pin when the external oscillator is used. (Block diagram)
fOSCH X1 pin Enable oscillation EMCCR0
X2 pin
(Setting method) The oscillator is disabled and starts operation as buffer by writing "1" to EMCCR0 register. X2 pin is always outputted "1". By reset, is initialized to "0".
92CM27-25
2005-04-20
TMP92CM27
(3) Runaway provision with SFR protection register (Purpose) Provision in runaway of program by noise mixing. Write operation to specified SFR is prohibited so that provision program in runaway prevents that it is in the state which is fetch impossibility by stopping of clock, memory control register (memory controller) is changed. And error handling in runaway becomes easy by INTP0 interruption. Specified SFR list 1. Memory controller B0CSL/H, B1CSL/H, B2CSL/H, B3CSL/H, B4CSL/H, B5CSL/H, BEXCSL/H MSAR0, MSAR1, MSAR2, MSAR3, MSAR4, MSAR5 MAMR0, MAMR1, MAMR2, MAMR3, MAMR4, MAMR5, PMEMCR 2. Clock gear SYSCR0, SYSCR1, SYSCR2, EMCCR0 3. PLL PLLCR0, PLLCR1 (Operation explanation) Execute and release of protection (write operation to specified SFR) becomes possible by setting up a double key to EMCCR1 and EMCCR2 register. (Double key) 1st KEY: Succession writes in 5AH at EMCCR1 and A5H at EMCCR2 2nd KEY: Succession writes in A5H at EMCCR1 and 5AH at EMCCR2 A state of protection can be confirmed by reading EMCCR0 . By reset, protection becomes OFF. And INTP0 interruption occurs when write operation to specified SFR was executed with protection on state.
92CM27-26
2005-04-20
TMP92CM27
3.3.6
Stand-by Controller
(1) HALT modes and port drive register When the HALT instruction is executed, the operating mode switches to IDLE2, IDLE1 or STOP mode, depending on the contents of the SYSCR2 register. The subsequent actions performed in each mode are as follows: 1. IDLE2: Only the CPU halts. The internal I/O is available to select operation during IDLE2 mode by setting the following register. Table 3.3.1 shows the registers of setting operation during IDLE2 mode.
Table 3.3.1 SFR Setting Operation during IDLE2 Mode Internal I/O
TMRA01 TMRA23 TMRA45 TMRA67 TMRB0 TMRB1 TMRB2 TMRB3 TMRB4 TMRB5 SIO0 SIO1 SIO2 SIO3 SBI0 SBI1 AD Converter WDT
SFR
TA01RUN TA23RUN TA45RUN TA67RUN TB0RUN TB1RUN TB2RUN TB3RUN TB4RUN TB5RUN SC0MOD1 SC1MOD1 SC2MOD1 SC3MOD1 SBI0BR0 SBI1BR0 ADMOD1 WDMOD
2. 3.
IDLE1: Only the oscillator and the Special timer for clock operate. STOP: All internal circuits stop operating.
92CM27-27
2005-04-20
TMP92CM27
The operation of each of the different HALT modes is described in Table 3.3.2 Table 3.3.2 I/O Operation during HALT Modes HALT Mode SYSCR2
CPU I/O ports TMRA, TMRB SIO, SBI Block AD converter WDT SDRAMC, Interrupt controller, HSIO, PG (Note) Available to select operation block Stop The state at the time of "HALT" instruction execution is held.
IDLE2 11
Stop
IDLE1 10
STOP 01
Table 3.3.8 references
Operate
Note 1: When operating PG in the IDLE2 mode, it is necessary to set operation at the time of the IDLE2 mode of the block (TMRA or TMRB) chosen as a trigger as permission. Note 2: It is necessary to set up the state in each HALT mode of a D/A converter in DAC0CNT0/DAC1CNT0 register before HALT instruction execution.
92CM27-28
2005-04-20
TMP92CM27
(2) How to release the HALT mode These halt states can be released by resetting or requesting an interrupt. The halt release sources are determined by the combination between the states of interrupt mask register and the HALT modes. The details for releasing the halt status are shown in Table 3.3.3. * Released by requesting an interrupt The operating released from the HALT mode depends on the interrupt enabled status. When the interrupt request level set before executing the "HALT" instruction exceeds the value of interrupt mask register, the interrupt due to the source is processed after releasing the HALT mode, and CPU status executing an instruction that follows the "HALT" instruction. When the interrupt request level set before executing the "HALT" instruction is less than the value of the interrupt mask register, releasing the HALT mode is not executed. (in non-maskable interrupts, interrupt processing is processed after releasing the HALT mode regardless of the value of the mask register.) However only for INT0 to INT7 interrupts, even if the interrupt request level set before executing the halt instruction is less than the value of the interrupt mask register, releasing the HALT mode is executed. In this case, interrupt processing is not performed, and CPU starts executing the instruction next to the halt instruction, but the interrupt request flag is held at "1". * Releasing by resetting Releasing all halt status is executed by resetting. When the STOP mode is released by RESET, it is necessry enough resetting time (see Table 3.3.4 Example of a setting of Warm-up time of oscillator) to set the operation of the oscillator to be stable. When releasing the HALT mode by resetting, the internal RAM data keeps the state before the "HALT" instruction is executed. However the other settings contents are initialized. (Releasing due to interrupts keeps the state before the "HALT" instruction is executed.)
92CM27-29
2005-04-20
TMP92CM27
Table 3.3.3 Source of Halt State Clearance and Halt Clearance Operation Status of Received Interrupt HALT Mode
NMI INTWDT INT0 to 3 (Note 1) INT4 to 7 (PORT) (Note 1) (Note 3) INT4 to 7 (TMRB0 to 1) (Note 3) INT8 to B (PORT) (Note 1) (Note 3)
Interrupt Enabled IDLE2

Interrupt Disabled IDLE2
- -
(Interrupt level) (Interrupt mask) (Interrupt level) < (Interrupt mask)
IDLE1
STOP

*1
IDLE1
- -
STOP
- -
*1 *1
x

x
*1 *1
Source of Halt State Clearance
x x x x x x x x x
x x x x x x x x x
*1
x x x x x x x x x
x x x x x x x x x
x x x x x x x x x
*1
Interrupt
INT8 to B (TMRB2 to 3) (Note 3) INTTA0 to 7 INTTB00 to 51, INTTBOX INTRX0 to 3, INTTX0 to 3 INTAD INTSBI0 to 1 INTHSC0 to 1 KI (Key On WakeUp) (Note 2) RESET
Initialize LSI
: After clearing the HALT mode, CPU starts interrupt processing.
: After clearing the HALT mode, CPU resumes executing starting from instruction following the Halt
instruction. x: It can not be used to release the HALT mode. -: The priority level (interrupt request level) of non-maskable interrupts is fixed to "7", the highest priority level. There is not this combination type. *1: Releasing the HALT mode is executed after passing the warm-up time.
Note 1: When the HALT mode is cleared by an INT0 to B interrupt of the level mode in the interrupt enabled status, hold level "H" until starting interrupt processing. If level "L" is set before holding level "L", interrupt processing is correctly started. Note 2: Although a KI can cancel all HALT mode states, the function as interruption does not have it. Note 3: The operation of the HALT release of INT4 to INTB becomes operation of (PORT) when setting it to the INTn input by the port setting. It becomes operation of (TMRB) when setting it to 16 bit timer input. Note 4: Set the INTSEL register when you use interrupt to which the interrupt factor is used combinedly. Details wish the reference to "Interrupt control of 3.3.4 interrupt controllers (3)".
92CM27-30
2005-04-20
TMP92CM27
Example:
Releasing IDLE1 mode An INT0 interrupt clears the halt state when the device is in IDLE1 mode.
Address 10003H 10006H 10009H 1000CH 1000EH 10011H INT0
LD LD LD EI LD HALT
(IIMC1), 00H (IIMC2), 00H (INTE01), 06H 5 (SYSCR2), 28H
; ; ; ; ;
Selects INT0 interrupt rising edge. Selects INT0 interrupt edge Sets INT0 interrupt level to 6. Sets interrupt level to 5 for CPU. Sets HALT mode to IDLE1 mode. Halts CPU. INT0 interrupt routine RETI
10012H
LD
XX, XX
92CM27-31
2005-04-20
TMP92CM27
(3) Operation 1. IDLE2 mode In IDLE2 mode only specific internal I/O operations, as designated by the IDLE2 setting register, can take place. Instruction execution by the CPU stops. Figure 3.3.6 illustrates an example of the timing for clearance of the IDLE2 mode halt state by an interrupt.
X1 A0 to A23 D0 to D15
Data Data
RD WR
Interrupt for release IDLE2 mode
Figure 3.3.6 Timing Chart for IDLE2 Mode Halt State Cleared by Interrupt 2. IDLE1 mode In IDLE1 mode, only the internal oscillator and Special timer for Clock continue to operate. The system clock stops. In the halt state, the interrupt request is sampled asynchronously with the system clock; however, clearance of the halt state (e.g., restart of operation) is synchronous with it. Figure 3.3.7 illustrates the timing for clearance of the IDLE1 mode halt state by an interrupt.
X1 A0 to A23 D0 to D15
Data Data
RD WR
Interrupt for release
IDLE1 mode
Figure 3.3.7 Timing Chart for IDLE1 Mode Halt State Cleared by Interrupt
92CM27-32
2005-04-20
TMP92CM27
3. STOP mode When STOP mode is selected, all internal circuits stop, including the internal oscillator. After STOP mode has been cleared system clock output starts when the warm-up time has elapsed, in order to allow oscillation to stabilize. The example of a setting of the Warm-up time at the time of STOP mode release is shown in Table 3.3.4. Figure 3.3.8 illustrates the timing for clearance of the STOP mode halt state by an interrupt.
Warm-up time of internal osillator + Warm-up time of built-in FlashROM
X1
A0 to A23 D0 to D15 RD
Data Data
WR
Interrupt for release STOP mode
Figure 3.3.8 Timing Chart for STOP Mode Halt State Cleared by Interrupt
Table 3.3.4 Example of a setting of Warm-up time of oscillator (at the time of STOP mode release)
at fOSCH = 16 MHz
SYSCR2 01 (2 )
16 s
8
10 (2 )
1.024 ms
14
11 (2 )
4.096 ms
16
92CM27-33
2005-04-20
TMP92CM27
3.3
Clock Function and Stand-by Function
TMP92CM27 contains (1) clock gear, (2) clock doubler (PLL), (3) stand-by controller and (4) noise reducing circuit. They are used for low power, low noise systems. This chapter is organized as follows: 3.3.1 Block diagram of system clock 3.3.2 SFR 3.3.3 System clock controller 3.3.4 Clock doubler (PLL) 3.3.5 Noise reducing circuits 3.3.6 Stand-by controller
92CM27-14
2005-04-20
TMP92CM27
The clock operating modes are as follows: (a) single clock mode (X1, X2 pins only), (b) dual clock mode (X1, X2 pins and PLL). Figure 3.3.1 shows a transition figure.
Reset (fOSCH/32) Release reset NORMAL mode (fOSCH/gear value/2) Instruction Interrupt STOP mode (Stops all circuits)
IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator)
Instruction Interrupt Instruction Interrupt (a)
Single clock mode transition figure Reset (fOSCH/32) Release reset Instruction NORMAL mode Interrupt (fOSCH/gear value/2) Instruction Note
IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator)
Instruction Interrupt Instruction Interrupt Instruction Interrupt Instruction Interrupt (b)
STOP mode (Stops all circuits)
NORMAL mode (4x fOSCH/gear value/2) Dual clock mode transition figure
Note 1:
If you shift from NORMAL mode with use of PLL to NORMAL mode, execute following setting in the same order. 1) Change CPU clock (PLLCR0 "0") 2) Stop PLL circuit (PLLCR1 "0")
Note 2:
It's prohibited to shift from NORMAL mode with use of PLL to STOP mode directly. You should set NORMAL mode once, and then shift to STOP mode. (You should stop high-frequency oscillator after you stop PLL.)
Figure 3.3.1 System Clock Block Diagram
The clock frequency input from the X1 and X2 pins is called fOSCH and clock frequency selected by SYSCR1 is called the system clock fFPH. The system clock fSYS is defined as the divided clock of fFPH, and one cycle of fSYS is defined to as one state.
92CM27-15
2005-04-20
TMP92CM27
3.3.1
Block Diagram of System Clock
SYSCR2 Warm-up timer (High-frequency oscillator) Lock up timer (PLL) fFPH PLLCR1, PLLCR0 fc fPLL = fOSCH x 4 Clock doubler (PLL) Selector
/2 /4
T T0 /2 /4
fc/2 fc/4 fc/8
fc/16 /8 /16
/2
fSYS
X1 X2
High-frequency oscillator fOSCH
Clock-gear PLLCR0
SYSCR1
fSYS TMRA0 to 7, TMRB0 to 5 T0
Prescaler
CPU RAM Interrupt controller SIO0 to SIO3
Prescaler
ADC I/O ports Memory controller SDRAMC DAC PG HSIO
SBI0 to SBI1 T
Prescaler
Figure 3.3.2 Block Diagram of System Clock
92CM27-16
2005-04-20
TMP92CM27
3.3.2
SYSCR0 (10E0H)
SFR
7 6 5 4 3 2
- R/W 0 Always write "0"
1
0
Bit symbol Read/Write After reset Function
7
SYSCR1 (10E1H) Bit symbol Read/Write After reset Function
6
5
4
3
2
GEAR2 1
1
GEAR1 R/W 0
0
GEAR0 0
Select gear value of high-frequency (fc) 000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 101: (Reserved) 110: (Reserved) 111: (Reserved)
7
SYSCR2 (10E2H) Bit symbol Read/Write After reset Function - R/W 0 Always write "0"
6
5
WUPTM1 R/W 1
4
WUPTM0 R/W 0
3
HALTM1 R/W 1 HALT mode 00: Reserved 01: STOP mode 10: IDLE1 mode 11: IDLE2 mode
2
HALTM0 R/W 1
1
0
DRVE R/W 0 1: The inside of STOP mode also drives a pin
Warm-up timer 00: Reserved 01: 28/input frequency 10: 214/input frequency 11: 216/input frequency
Note 1: SYSCR0 can read "1". Note 2: SYSCR0, SYSCR0, SYSCR1, and SYSCR2 can read "0".
Figure 3.3.3 SFR for System Clock
92CM27-17
2005-04-20
TMP92CM27
7
EMCCR0 (10E3H) Bit symbol Read/Write After reset Function PROTECT R 0 Protect flag 0: OFF 1: ON
6
5
4
3
2
EXTIN R/W 0 1: External clock
1
DRVOSCH R/W 1
fc oscillator driver ability 1: Normal 0: Weak
0
EMCCR1 (10E4H)
Bit symbol Read/Write After reset Function Switching the protect ON/OFF by write to following 1st-KEY, 2nd-KEY 1st-KEY: EMCCR1 = 5AH, EMCCR2 = A5H in succession write 2nd-KEY: EMCCR1 = A5H, EMCCR2 = 5AH in succession write
EMCCR2 (10E5H)
Bit symbol Read/Write After reset Function
Note 1: EMCCR0 can read "1". Note 2: EMCCR0 can read "0". Note 3: In case restarting the oscillator in the stop oscillation state (e.g. Restart the oscillator in STOP
mode), set (EMCCR0) = "1". Figure 3.3.4 SFR for System Clock
92CM27-18
2005-04-20
TMP92CM27
7
PLLCR0 (10E8H) Bit symbol Read/Write After reset Function
6
FCSEL R/W 0 Select fc clock 0: fOSCH 1: fPLL
5
LUPFG R 0 Lock up timer status flag 0: Not end 1: End
4
3
2
1
0
Note 1: Be carefull that logic of PLLCR0 is different from 900/L's DFM. Note 2: PLLCR0, can read "0".
7
PLLCR1 (10E9H) Bit symbol Read/Write After reset Function PLLON R/W 0 Control on/off 0: OFF 1: ON
6
5
4
3
2
1
0
Note 1: PLLCR1 can read "0".
Figure 3.3.5 SFR for PLL
92CM27-19
2005-04-20
TMP92CM27
3.3.3
System Clock Controller
The system clock controller generates the system clock signal (fSYS) for the CPU core and internal I/O. It contains a oscillation circuits, PLL and a clock gear circuit for high-frequency (fc) operation. The register SYSCR1 sets the high-frequency clock gear to either 1, 2, 4, 8 or 16 (fc, fc/2, fc/4, fc/8 or fc/16). These functions can reduce the power consumption of the equipment in which the device is installed. The initialization = "100" will cause the system clock (fSYS) to be set to fc/32 (fc/16 x 1/2) after reset. For example, fSYS is set to 1.25 MHz when the 40 MHz oscillator is connected to the X1 and X2 pins. (1) Clock gear controller The fFPH is set according to the contents of the clock gear select register SYSCR1 to either fc, fc/2, fc/4, fc/8 or fc/16. Using the clock gear to select a lower value of fFPH reduces power consumption. Example: Changing to a high-frequency gear
SYSCR1 EQU LD LD X: Don't care 10E1H (SYSCR1), XXXXX001B (DUMMY), 00H ; Changes fSYS to fc/2. Dummy instruction
(High-speed clock gear changing) To change the clock gear, write the register value to the SYSCR1 register. It is necessary the warm-up time until changing after writing the register value. There is the possibility that the instruction next to the clock gear changing instruction is executed by the clock gear before changing. To execute the instruction next to the clock gear switching instruction by the clock gear after changing, input the dummy instruction as follows (instruction to execute the write cycle). Example:
SYSCR1 EQU LD LD 10E1H (SYSCR1), XXXXX010B (DUMMY), 00H ; ; Changes fSYS to fc/4. Dummy instruction
Instruction to be executed after clock gear has changed
92CM27-20
2005-04-20
TMP92CM27
3.3.4
Clock Doubler (PLL)
PLL outputs the fPLL clock signal, which is four times as fast as fOSCH. It can use the low-speed-frequency oscillator, even though the internal clock is high-frequency. A reset initializes PLL to stop status, setting to PLLCR0, PLLCR1 register is needed before use. Like an oscillator, this circuit requires time to stabilize. This is called the lock up time and it is measured by 16-stage binary counter. Lock up time is about 1.6 ms at fOSCH = 10 MHz. Note 1: Input frequency limitation for PLL The limitation of input frequency (High-frequency oscillation) for PLL is following. fOSCH = 6 to 10 MHz (VCC = 3.0 to 3.6 V) Note 2: PLLCR0 The logic of PLLCR0 is different from 900/L1's DFM. Be careful to judge an end of lock up time
. The following is an setting example for PLL starting and PLL stopping. Example 1: PLL starting
PLLCR0 PLLCR1 LUP: EQU EQU LD BIT JR LD 10E8H 10E9H (PLLCR1), 1 X X X X X X X B 5, (PLLCR0) Z, LUP (PLLCR0), X 1 X X X X X X B
; ; ; ;
Enables PLL operation and starts lock up. Detects end of lock up. Changes fc from 10 MHz to 40 MHz.
X: Don't care
PLL output: fPLL Lock up timer System clock fSYS Starts PLL operation and starts lock up Changes from 10 MHz to 40 MHz Ends of lock up Counts up by fOSCH During lock up After lock up
92CM27-21
2005-04-20
TMP92CM27
Example 2: PLL stopping
PLLCR0 PLLCR1 EQU EQU LD LD 10E8H 10E9H (PLLCR0), X0XXXXXXB (PLLCR1), 0XXXXXXXB
; ;
Changes fc from 40 MHz to10 MHz. Stop PLL.
X: Don't care PLL output: fPLL System clock fSYS Changes from 40 MHz to 10 MHz Stops PLL operation
92CM27-22
2005-04-20
TMP92CM27
Limitation point on the use of PLL 1. If you stop PLL operation during using PLL, you should execute following setting in the same order.
LD LD (PLLCR0), 00H (PLLCR1), 00H ; ; Change the clock fPLLto fOSCH PLL stop
Examples of settings are below. (2) Change/stop control (OK) PLL use mode (fPLL) Set the STOP mode High-frequency oscillator operation mode (fOSCH) PLL stop Halt (High-frequency oscillator stop)
(SYSCR2), (PLLCR0), (PLLCR1), 0 X--01 X-B; X0 -XXXXXB; 0XXXXXXXB; ; Set the STOP mode (This command can execute before use of PLL) Change the system clock fPLL to fOSCH PLL stop Shift to STOP mode
LD LD LD HALT
(Error) PLL use mode (fPLL) Set the STOP mode Halt (High-frequency oscillator stop)
LD HALT (SYSCR2), 0 X--01X-B; ; Set the STOP mode (This command can execute before use of PLL) Shift to STOP mode
92CM27-23
2005-04-20
TMP92CM27
3.3.5
Noise Reduction Circuits
Noise reduction circuits are built-in, allowing implementation of the following features. (1) Reduced drivability for high-frequency oscillator (2) Single drive for high-frequency oscillator (3) SFR protection of register contents These functions need a setup by EMCCR0, EMCCR1, and EMCCR2 register. (1) to (3) is explained below. (1) Reduced drivability for high-frequency oscillator (Purpose) Reduces noise and power for oscillator when a resonator is used. (Block diagram)
fOSCH C1 Resonator X1 pin Enable oscillation EMCCR0
C2 X2 pin
(Setting method) The drive ability of the oscillator is reduced by writing "0" to EMCCR0 register. By reset, is initialized to "1" and the oscillator starts oscillation by normal drivability when the power-supply is on.
Note: This function (EMCCR0 = "0") is available to use in case of fOSCH = 6 to 10 MHz condition.
92CM27-24
2005-04-20
TMP92CM27
(2) Single drive for high-frequency oscillator (Purpose) Not need twin drive and protect mistake operation by inputted noise to X2 pin when the external oscillator is used. (Block diagram)
fOSCH X1 pin Enable oscillation EMCCR0
X2 pin
(Setting method) The oscillator is disabled and starts operation as buffer by writing "1" to EMCCR0 register. X2 pin is always outputted "1". By reset, is initialized to "0".
92CM27-25
2005-04-20
TMP92CM27
(3) Runaway provision with SFR protection register (Purpose) Provision in runaway of program by noise mixing. Write operation to specified SFR is prohibited so that provision program in runaway prevents that it is in the state which is fetch impossibility by stopping of clock, memory control register (memory controller) is changed. And error handling in runaway becomes easy by INTP0 interruption. Specified SFR list 1. Memory controller B0CSL/H, B1CSL/H, B2CSL/H, B3CSL/H, B4CSL/H, B5CSL/H, BEXCSL/H MSAR0, MSAR1, MSAR2, MSAR3, MSAR4, MSAR5 MAMR0, MAMR1, MAMR2, MAMR3, MAMR4, MAMR5, PMEMCR 2. Clock gear SYSCR0, SYSCR1, SYSCR2, EMCCR0 3. PLL PLLCR0, PLLCR1 (Operation explanation) Execute and release of protection (write operation to specified SFR) becomes possible by setting up a double key to EMCCR1 and EMCCR2 register. (Double key) 1st KEY: Succession writes in 5AH at EMCCR1 and A5H at EMCCR2 2nd KEY: Succession writes in A5H at EMCCR1 and 5AH at EMCCR2 A state of protection can be confirmed by reading EMCCR0 . By reset, protection becomes OFF. And INTP0 interruption occurs when write operation to specified SFR was executed with protection on state.
92CM27-26
2005-04-20
TMP92CM27
3.3.6
Stand-by Controller
(1) HALT modes and port drive register When the HALT instruction is executed, the operating mode switches to IDLE2, IDLE1 or STOP mode, depending on the contents of the SYSCR2 register. The subsequent actions performed in each mode are as follows: 1. IDLE2: Only the CPU halts. The internal I/O is available to select operation during IDLE2 mode by setting the following register. Table 3.3.1 shows the registers of setting operation during IDLE2 mode.
Table 3.3.1 SFR Setting Operation during IDLE2 Mode Internal I/O
TMRA01 TMRA23 TMRA45 TMRA67 TMRB0 TMRB1 TMRB2 TMRB3 TMRB4 TMRB5 SIO0 SIO1 SIO2 SIO3 SBI0 SBI1 AD Converter WDT
SFR
TA01RUN TA23RUN TA45RUN TA67RUN TB0RUN TB1RUN TB2RUN TB3RUN TB4RUN TB5RUN SC0MOD1 SC1MOD1 SC2MOD1 SC3MOD1 SBI0BR0 SBI1BR0 ADMOD1 WDMOD
2. 3.
IDLE1: Only the oscillator and the Special timer for clock operate. STOP: All internal circuits stop operating.
92CM27-27
2005-04-20
TMP92CM27
The operation of each of the different HALT modes is described in Table 3.3.2 Table 3.3.2 I/O Operation during HALT Modes HALT Mode SYSCR2
CPU I/O ports TMRA, TMRB SIO, SBI Block AD converter WDT SDRAMC, Interrupt controller, HSIO, PG (Note) Available to select operation block Stop The state at the time of "HALT" instruction execution is held.
IDLE2 11
Stop
IDLE1 10
STOP 01
Table 3.3.8 references
Operate
Note 1: When operating PG in the IDLE2 mode, it is necessary to set operation at the time of the IDLE2 mode of the block (TMRA or TMRB) chosen as a trigger as permission. Note 2: It is necessary to set up the state in each HALT mode of a D/A converter in DAC0CNT0/DAC1CNT0 register before HALT instruction execution.
92CM27-28
2005-04-20
TMP92CM27
(2) How to release the HALT mode These halt states can be released by resetting or requesting an interrupt. The halt release sources are determined by the combination between the states of interrupt mask register and the HALT modes. The details for releasing the halt status are shown in Table 3.3.3. * Released by requesting an interrupt The operating released from the HALT mode depends on the interrupt enabled status. When the interrupt request level set before executing the "HALT" instruction exceeds the value of interrupt mask register, the interrupt due to the source is processed after releasing the HALT mode, and CPU status executing an instruction that follows the "HALT" instruction. When the interrupt request level set before executing the "HALT" instruction is less than the value of the interrupt mask register, releasing the HALT mode is not executed. (in non-maskable interrupts, interrupt processing is processed after releasing the HALT mode regardless of the value of the mask register.) However only for INT0 to INT7 interrupts, even if the interrupt request level set before executing the halt instruction is less than the value of the interrupt mask register, releasing the HALT mode is executed. In this case, interrupt processing is not performed, and CPU starts executing the instruction next to the halt instruction, but the interrupt request flag is held at "1". * Releasing by resetting Releasing all halt status is executed by resetting. When the STOP mode is released by RESET, it is necessry enough resetting time (see Table 3.3.4 Example of a setting of Warm-up time of oscillator) to set the operation of the oscillator to be stable. When releasing the HALT mode by resetting, the internal RAM data keeps the state before the "HALT" instruction is executed. However the other settings contents are initialized. (Releasing due to interrupts keeps the state before the "HALT" instruction is executed.)
92CM27-29
2005-04-20
TMP92CM27
Table 3.3.3 Source of Halt State Clearance and Halt Clearance Operation Status of Received Interrupt HALT Mode
NMI INTWDT INT0 to 3 (Note 1) INT4 to 7 (PORT) (Note 1) (Note 3) INT4 to 7 (TMRB0 to 1) (Note 3) INT8 to B (PORT) (Note 1) (Note 3)
Interrupt Enabled IDLE2

Interrupt Disabled IDLE2
- -
(Interrupt level) (Interrupt mask) (Interrupt level) < (Interrupt mask)
IDLE1
STOP

*1
IDLE1
- -
STOP
- -
*1 *1
x

x
*1 *1
Source of Halt State Clearance
x x x x x x x x x
x x x x x x x x x
*1
x x x x x x x x x
x x x x x x x x x
x x x x x x x x x
*1
Interrupt
INT8 to B (TMRB2 to 3) (Note 3) INTTA0 to 7 INTTB00 to 51, INTTBOX INTRX0 to 3, INTTX0 to 3 INTAD INTSBI0 to 1 INTHSC0 to 1 KI (Key On WakeUp) (Note 2) RESET
Initialize LSI
: After clearing the HALT mode, CPU starts interrupt processing.
: After clearing the HALT mode, CPU resumes executing starting from instruction following the Halt
instruction. x: It can not be used to release the HALT mode. -: The priority level (interrupt request level) of non-maskable interrupts is fixed to "7", the highest priority level. There is not this combination type. *1: Releasing the HALT mode is executed after passing the warm-up time.
Note 1: When the HALT mode is cleared by an INT0 to B interrupt of the level mode in the interrupt enabled status, hold level "H" until starting interrupt processing. If level "L" is set before holding level "L", interrupt processing is correctly started. Note 2: Although a KI can cancel all HALT mode states, the function as interruption does not have it. Note 3: The operation of the HALT release of INT4 to INTB becomes operation of (PORT) when setting it to the INTn input by the port setting. It becomes operation of (TMRB) when setting it to 16 bit timer input. Note 4: Set the INTSEL register when you use interrupt to which the interrupt factor is used combinedly. Details wish the reference to "Interrupt control of 3.3.4 interrupt controllers (3)".
92CM27-30
2005-04-20
TMP92CM27
Example:
Releasing IDLE1 mode An INT0 interrupt clears the halt state when the device is in IDLE1 mode.
Address 10003H 10006H 10009H 1000CH 1000EH 10011H INT0
LD LD LD EI LD HALT
(IIMC1), 00H (IIMC2), 00H (INTE01), 06H 5 (SYSCR2), 28H
; ; ; ; ;
Selects INT0 interrupt rising edge. Selects INT0 interrupt edge Sets INT0 interrupt level to 6. Sets interrupt level to 5 for CPU. Sets HALT mode to IDLE1 mode. Halts CPU. INT0 interrupt routine RETI
10012H
LD
XX, XX
92CM27-31
2005-04-20
TMP92CM27
(3) Operation 1. IDLE2 mode In IDLE2 mode only specific internal I/O operations, as designated by the IDLE2 setting register, can take place. Instruction execution by the CPU stops. Figure 3.3.6 illustrates an example of the timing for clearance of the IDLE2 mode halt state by an interrupt.
X1 A0 to A23 D0 to D15
Data Data
RD WR
Interrupt for release IDLE2 mode
Figure 3.3.6 Timing Chart for IDLE2 Mode Halt State Cleared by Interrupt 2. IDLE1 mode In IDLE1 mode, only the internal oscillator and Special timer for Clock continue to operate. The system clock stops. In the halt state, the interrupt request is sampled asynchronously with the system clock; however, clearance of the halt state (e.g., restart of operation) is synchronous with it. Figure 3.3.7 illustrates the timing for clearance of the IDLE1 mode halt state by an interrupt.
X1 A0 to A23 D0 to D15
Data Data
RD WR
Interrupt for release
IDLE1 mode
Figure 3.3.7 Timing Chart for IDLE1 Mode Halt State Cleared by Interrupt
92CM27-32
2005-04-20
TMP92CM27
3. STOP mode When STOP mode is selected, all internal circuits stop, including the internal oscillator. After STOP mode has been cleared system clock output starts when the warm-up time has elapsed, in order to allow oscillation to stabilize. The example of a setting of the Warm-up time at the time of STOP mode release is shown in Table 3.3.4. Figure 3.3.8 illustrates the timing for clearance of the STOP mode halt state by an interrupt.
Warm-up time of internal osillator + Warm-up time of built-in FlashROM
X1
A0 to A23 D0 to D15 RD
Data Data
WR
Interrupt for release STOP mode
Figure 3.3.8 Timing Chart for STOP Mode Halt State Cleared by Interrupt
Table 3.3.4 Example of a setting of Warm-up time of oscillator (at the time of STOP mode release)
at fOSCH = 16 MHz
SYSCR2 01 (2 )
16 s
8
10 (2 )
1.024 ms
14
11 (2 )
4.096 ms
16
92CM27-33
2005-04-20
TMP92CM27
3.4 Interrupt
Interrupts of TLCS-900/H1 are controlled by the CPU interrupt mask flip-flop (IFF2:0) and by the built-in interrupt controller. The TMP92CM27 has a total of 71 interrupts divided into the following types: * * * * Interrupts generated by CPU: 9 sources (Software interrupts: 8 sources, illegal instruction interrupt: 1 source) External interrupts ( NMI and INT0 to INTB): 13 sources Internal I/O interrupts: 41 sources Micro DMA transfer end interrupts: 8 sources
A individual interrupt vector number (Fixed) is assigned to each interrupt. One of six priority level (Variable) can be assigned to each maskable interrupt. The priority level of non-maskable interrupts are fixed at "7" as the highest level. When an interrupt is generated, the interrupt controller sends the priority of that interrupt to the CPU. If multiple interrupts are generated simultaneously, the interrupt controller sends the interrupt with the highest priority to the CPU. (The highest priority is level 7 using for non-maskable interrupts.) The CPU compares the priority level of the interrupt with the value of the CPU interrupts mask register . If the priority level of the interrupt is higher than the value of the interrupt mask register, the CPU accepts the interrupt. The interrupt mask register value can be updated using the value of the EI instruction (EI num sets data to num). For example, specifying "EI3" enables the maskable interrupts which priority level set in the interrupt controller is 3 or higher, and also non-maskable interrupts. Operationally, the DI instruction ( = 7) is identical to the EI7 instruction. DI instruction is used to disable maskable interrupts because of the priority level of maskable interrupts is 0 to 6. The EI instruction is valid immediately after execution. In addition to the above general-purpose interrupt processing mode, TLCS-900/H1 has a micro DMA interrupt processing mode as well. The CPU can transfer the data (1/2/4 bytes) automatically in micro DMA mode, therefore this mode is used for speed-up interrupt processing, such as transferring data to the internal or external peripheral I/O. Moreover, TMP92CM27 has software start function for micro DMA processing request by the software not by the hardware interrupt. Figure 3.4.1 shows the overall interrupt processing flow.
92CM27-34
2005-04-20
TMP92CM27
Interrupt processing Micro DMA soft start request Interrupt specified by micro DAM start vector? NO Interrupt vector "V" read Interrupt request F/F clear YES
Clear interrupt request flag
Data transfer by maicro DMA Maicro DMA processing
General-purpose interrupt processing
PUSH PC PUSH SR SRLevel of accepted interrupt + 1 INTNESTINTNEST + 1
COUNT COUNT1
COUNT = 0 NO
YES
Generating INTTC interrupt clear maicro DMA start vector
PC(FFFF00H)V)
Interrupt process program
RETI instruction POP SR POP PC INTNEST INTNEST-1
End
Figure 3.4.1 Interrupt and Micro DMA Processing Sequence
92CM27-35
2005-04-20
TMP92CM27
3.4.1
General-purpose Interrupt Processing
When the CPU accepts an interrupt, it usually performs the following sequence of operations. However, when a software interrupt and illegal instruction interrupt are generated by CPU, CPU flies (1) and (3) and performs only the process of (2), (4), and (5). (1) The CPU reads the interrupt vector from the interrupt controller. If the same level interrupts occur simultaneously, the interrupt controller generates an interrupt vector in accordance with the default priority and clears the interrupt request. (The default priority is already fixed for each interrupt: The smaller vector value has the higher priority level.) (2) The CPU pushes the value of program counter (PC) and status register (SR) onto the stack area (indicated by XSP). (3) The CPU sets the value which is the priority level of the accepted interrupt plus 1 (+1) to the interrupt mask register . However, if the priority level of the accepted interrupt is "7", the register's value is set to "7". (4) The CPU increases the interrupt nesting counter INTNEST by 1 (+1). (5) The CPU jumps to the address indicated by the data at address "FFFF00H + Interrupt vector" and starts the interrupt processing routine. When the CPU completed the interrupt processing, use the "RETI" instruction to return to the main routine. "RETI" restores the contents of program counter (PC) and status register (SR) from the stack and decreases the interrupt nesting counter INTNEST by 1(-1). Non-maskable interrupts cannot be disabled by a user program. However maskable interrupts can be enabled or disabled by a user program. A program can set the priority level for each interrupt source. (A priority level setting of 0 or 7 will disable an interrupt request.) If an interrupt request which has a priority level equal to or greater than the value of the CPU interrupt mask register comes out, the CPU accepts its interrupt. Then, the CPU interrupt mask register is set to the value of the priority level for the accepted interrupt plus 1(+1). Therefore, if an interrupt is generated with a higher level than the current interrupt during it's processing, the CPU accepts the later interrupt and goes to the nesting status of interrupt processing. Moreover, if the CPU receives another interrupt request while performing the said (1) to (5) processing steps of the current interrupt, the latest interrupt request is sampled immediately after execution of the first instruction of the current interrupt processing routine. Specifying "DI" as the start instruction disables maskable interrupt nesting. A reset initializes the interrupt mask register to "7", disabling all maskable interrupts. Table 3.4.1 shows the TMP92CM27 interrupt vectors and micro DMA start vectors. The address FFFF00H to FFFFFFH (256 bytes) is assigned for the interrupt vector area.
92CM27-36
2005-04-20
TMP92CM27
Table 3.4.1 TMP92CM27 Inerrupt Vectors and Micro DMA Start Vectors
Default Priority 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 Type Interrupt Source Reset or "SWI0" instruction "SWI1" instruction "Illegal instruction" or "SWI2" instruction "SWI3" instruction "SWI4" instruction "SWI5" instruction "SWI6" instruction "SWI7" instruction NMI: External interrupt input pin INTWD: Watchdog Timer Micro DMA (Note 1) INT0: External interrupt input pin INT1: External interrupt input pin INT2: External interrupt input pin INT3: External interrupt input pin INT4: External interrupt input pin INT5: External interrupt input pin INT6: External interrupt input pin INT7: External interrupt input pin INTTA0: 8-bit timer 0 INTTA1: 8-bit timer 1 INTTA2: 8-bit timer 2 INTTA3: 8-bit timer 3 INTTA4: 8-bit timer 4 INTTA5: 8-bit timer 5 INT8: External interrupt input pin INTTA6: 8-bit timer 6 INTTA7: 8-bit timer 7 INT9: External interrupt input pin INTRX0: Serial 0 (SIO0) receive INTTX0: Serial 0 (SIO0) transmission INTRX1: Serial 1 (SIO1) receive INTTX1: Serial 1 (SIO1) transmission INTRX2: Serial 2 (SIO2) receive INTTX2: Serial 2 (SIO2) transmission INTRX3: Serial 3 (SIO3) receive INTTX3: Serial 3 (SIO3) transmission INTSBI0: SBI0 I2CBUS transfer end INTSBI1: SBI1 I2CBUS transfer end INTA: External interrupt input pin INTHSC0: High speed serial (HSC0) INTB: External interrupt input pin INTHSC1: High speed serial (HSC1) INTTB00: 16-bit timer 0 INTTB01: 16-bit timer 0 INTTB10: 16-bit timer 1 INTTB11: 16-bit timer 1 INTTB20: 16-bit timer 2 INTTB21: 16-bit timer 2 Vector Value 0000H 0004H 0008H 000CH 0010H 0014H 0018H 001CH 0020H 0024H 0028H 002CH 0030H 0034H 0038H 003CH 0040H 0044H 0048H 004CH 0050H 0054H 0058H 005CH 0060H 0064H 0068H 006CH 0070H 0074H 0078H 007CH 0080H 0084H 0088H 008CH 0090H 0094H 0098H 009CH 00A0H 00A4H 00A8H 00ACH 00B0H 00B4H Address Refer to Vector FFFF00H FFFF04H FFFF08H FFFF0CH FFFF10H FFFF14H FFFF18H FFFF1CH FFFF20H FFFF24H FFFF28H FFFF2CH FFFF30H FFFF34H FFFF38H FFFF3CH FFFF40H FFFF44H FFFF48H FFFF4CH FFFF50H FFFF54H FFFF58H FFFF5CH FFFF60H FFFF64H FFFF68H FFFF6CH FFFF70H FFFF74H FFFF78H FFFF7CH FFFF80H FFFF84H FFFF88H FFFF8CH FFFF90H FFFF94H FFFF98H FFFF9CH FFFFA0H FFFFA4H FFFFA8H FFFFACH FFFFB0H FFFFB4H Micro DMA Start Vector
Nonmaskable
0AH (Note 1) 0BH (Note 1) 0CH (Note 1) 0DH (Note 1) 0EH (Note 1) 0FH (Note 1) 10H (Note 1) 11H (Note 1) 12H 13H 14H 15H 16H 17H (Note 1) (Note 2) 18H 19H (Note 1) (Note 2) 1AH (Note 1) 1BH 1CH (Note 1) 1DH 1EH (Note 1) 1FH 20H (Note 1) 21H 22H 23H 24H 25H 26H 27H 28H 29H 2AH 2BH 2CH 2DH
92CM27-37
2005-04-20
TMP92CM27
47 48 49
50
Maskable 51 52 53 54 55 56 57 58 59 60 to -
INTTB30: 16-bit timer 3 INTTB31: 16-bit timer 3 INTTB40: 16-bit timer 4 INTTB41: 16-bit timer 4 INTTB50: 16-bit timer 5 INTTB51: 16-bit timer 5 INTTBOX: 16-bit timer (Overflow) Interruption occurs in one overflow interruption of the followings. INTTBOF0: 16-bit timer 0 (Overflow) INTTBOF1: 16-bit timer 1 (Overflow) INTTBOF2: 16-bit timer 2 (Overflow) INTTBOF3: 16-bit timer 3 (Overflow) INTTBOF4: 16-bit timer 4 (Overflow) INTTBOF5: 16-bit timer 5 (Overflow) INTAD: AD conversion end INTP0: Protect 0 (Write to special SFR) INTTC0: Micro DMA end (Channel 0) INTTC1: Micro DMA end (Channel 1) INTTC2: Micro DMA end (Channel 2) INTTC3: Micro DMA end (Channel 3) INTTC4: Micro DMA end (Channel 4) INTTC5: Micro DMA end (Channel 5) INTTC6: Micro DMA end (Channel 6) INTTC7: Micro DMA end (Channel 7) (Reserved)
00B8H 00BCH 00C0H
FFFFB8H FFFFBCH FFFFC0H
2EH (Note 2) 2FH (Note 2) 30H (Note 2)
00C4H
FFFFC4H
31H (Note 3)
00C8H 00CCH 00D0H 00D4H 00D8H 00DCH 00E0H 00E4H 00E8H 00ECH 00F0H : 00FCH
FFFFC8H FFFFCCH FFFFD0H FFFFD4H FFFFD8H FFFFDCH FFFFE0H FFFFE4H FFFFE8H FFFFECH FFFFF0H : FFFFFCH
32H 33H 34H 35H 36H 37H 38H 39H 3AH 3BH to -
Note 1: When standing-up micro DMA, set at edge detect mode. Note 2: The default priorities 24, 26, 47 to 49 are making the interruption factor serve a double purpose. It is necessary to choose the interruption factor used in an interruption factor selection register. Therefore, interruption cannot be used simultaneously. Note 3: The default priority 50 is making the interruption factor serve a double purpose. The interruption factor assigned to this default priority 50 can be used simultaneously. Of which interruption factor interruption occurred should interrupt, and please check it in a generating flag register. Note 4: Micro DMA stands up prior to other maskable interrupt.
92CM27-38
2005-04-20
TMP92CM27
3.4.2
Micro DMA
In addition to general purpose interrupt processing, the TMP92CM27 also includes a micro DMA function. Micro DMA processing for interrupt requests set by micro DMA is performed at the highest priority level for maskable interrupts (level 6), regardless of the priority level of the interrupt source. Because the micro DMA function has been implemented with the cooperative operation of CPU, when CPU is a stand-by state by HALT instruction, the requirement of micro DMA will be ignored (pending). Micro DMA is supported 8 channels and can be transferred continuously by specifying the micro DMA burst function in the following.
(1) Micro DMA operation When an interrupt request specified by the micro DMA start vector register is generated, the micro DMA triggers a micro DMA request to the CPU at interrupt priority highest level and starts processing the request in spite of any interrupt source's level. The micro DMA is ignored on = "7". The 8 micro DMA channels allow micro DMA processing to be set for up to 8 types of interrupts at any one time. When micro DMA is accepted, the interrupt request flip-flop assigned to that channel is cleared. The data are automatically transferred once (1/2/4 bytes) from the transfer source address to the transfer destination address set in the control register, and the transfer counter is decreased by 1 (-1). If the decreased result is "0", * * * * CPU send micro DMA transfer end interrupt (INTTCn) to interrupt controller Interrupt controller is generated micro DMA transfer end interrupt Micro DMA start vector register is cleared to "0", the next micro DMA operation is disabled Micro DMA processing terminates
If the decreased result is not "0", the micro DMA processing completes if it isn't specified the say later burst mode. In this case, the micro DMA transfer end interrupt (INTTCn) aren't generated. If an interrupt request is triggered for the interrupt source in use during the interval between the time at which the micro DMA start vector is cleared and the next setting, general-purpose interrupt processing is performed at the interrupt level set. Therefore, if the interrupt is only being used to initiate micro DMA (and not as a general-purpose interrupt), the interrupt level should first be set to "0" (e.g., interrupt requests should be disabled). The priority of the micro DMA transfer end interrupt is defined by the interrupt level and the default priority as the same as the other maskable interrupt. If a micro DMA request is set for more than one channel at the same time, the priority is not based on the interrupt priority level but on the channel number. The smaller channel number has the higher priority (Channel 0 (High) > Channel 7 (Low)). While the register for setting the transfer source/transfer destination addresses is a 32-bit control register, this register can only effectively output 24-bit addresses. Accordingly, micro DMA can access 16 Mbytes. Three micro DMA transfer modes are supported: one-byte transfers, 2-byte transfer and 4-byte transfer. After a transfer in any mode, the transfer source and transfer destination
92CM27-39
2005-04-20
TMP92CM27
addresses will either be incremented or decremented, or will remain unchanged. This simplifies the transfer of data from memory to memory, from I/O to memory, from memory to I/O, and from I/O to I/O. For details of the various transfer modes, refer Section 3.4.2 (4) "Detailed description of the transfer mode register". Since a transfer counter is a 16-bit counter, up to 65536 micro DMA processing operations can be performed per interrupt source (Provided that the transfer counter for the source is initially set to 0000H). Micro DMA processing can be initiated by any one of 51 different interrupts - the 50 interrupts shown in the micro DMA start vectors in Table 3.4.1 and a micro DMA soft start. Figure 3.4.2 shows micro DMA cycle in transfer destination address INC mode (Micro DMA transfers are the same in every mode except counter mode). (The conditions for this cycle are as follows: Both source and destination memory are internal RAM and multiples by 4 numbered source and destination addresses.)
1 state
(1) fSYS A230
(2)
(3)
(4)
(5)
src
dst
(Note)Actually, src and dst address are not output to A23 to A0 pins because they are address of internal RAM.
Figure 3.4.2 Timing for Micro DMA Cycle State (1),(2): State (3) State (4) State (5) Instruction fetch cycle (Prefetches the next instruction code) Micro DMA read cycle Micro DMA write cycle (The same as in state (1), (2))
: :
:
92CM27-40
2005-04-20
TMP92CM27
(2) Soft start function In addition to starting the micro DMA function by interrupts, TMP92CM27 includes a micro DMA software start function that starts micro DMA on the generation of the write cycle to the DMAR register. Writing "1" to each bit of DMAR register causes micro DMA once. At the end of transfer, the corresponding bit of the DMAR register is automatically cleared to "0". Only one channel can be set once for micro DMA. When programming again "1" to the DMAR register, check whether the bit is "0" before programming "1". When a burst is specified by DMAB register, data is continuously transferred until the value in the micro DMA transfer counter is "0" after start up of the micro DMA.
Symbol
Name
Address
7 DREQ7 0
6 DREQ6 0
5 DREQ5 0
4 DREQ4 0
3 DREQ3 R/W 0
2 DREQ2 0
1 DREQ1 0
0 DREQ0 0
DMAR
DMA request
109H (Prohibit
RMW)
(3) Transfer control registers The transfer source address and the transfer destination address are set in the following registers. Data setting for these registers is done by an "LDC cr, r" instruction.
Channel 0 DMAS0 DMAD0 DMAC0 DMAM0 DMA Source address register 0: only use LSB 24 bits DMA Destination address register 0: only use LSB 24 bits DMA Counter register 0: 1 to 65536 DMA Mode register 0
Channel 7 DMAS7 DMAD7 DMAC7 DMAM7 8 bits 16 bits 32 bits DMA Source address register 7: only use LSB 24 bits DMA Destination address register 7: only use LSB 24 bits DMA Counter register 7: 1 to 65536 DMA Mode register 7
92CM27-41
2005-04-20
TMP92CM27
(4) Detailed description of the transfer mode register 0 0 0 Mode DMAM0 7
DMAMn[4:0] 000zz
Operation Destination address INC mode (DMADn +) (DMASn) DMACn DMACn - 1 If DMACn = 0 then INTTCn Destination address DEC mode (DMADn -) (DMASn) DMACn DMACn - 1 If DMACn = 0 then INTTCn Source address INC mode (DMADn) (DMASn +) DMACn - 1 DMACn If DMACn = 0 then INTTCn Source address DEC mode (DMADn) (DMASn -) DMACn DMACn - 1 If DMACn = 0 then INTTCn Source address and Destination address INC mode (DMADn +) (DMASn +) DMACn DMACn - 1 If DMACn = 0 then INTTCn Source address and Destination address DEC mode (DMADn -) (DMASn -) DMACn DMACn - 1 If DMACn = 0 then INTTCn Source address and Destination address Fixed mode (DMADn) (DMASn) DMACn DMACn - 1 If DMACn = 0 then INTTCn Counter mode DMASn DMASn + 1 DMACn DMACn - 1 If DMACn = 0 then INTTCn
Execution Time 5 states
001zz
5 states
010zz
5 states
011zz
5 states
100zz
6 states
101zz
6 states
110zz
5 states
11100
5 states
ZZ:
00 = 1-byte transfer 01 = 2-byte transfer 10 = 4-byte transfer 11 = (Reserved) Note1: N stands for the micro DMA channel number (0 to 7) DMADn+/DMASn+: Post-increment (register value is incremented after transfer) DMADn-/DMASn-: Post-decrement (register value is decremented after transfer) "I/O" signifies fixed memory addresses; "memory" signifies incremented or decremented memory addresses. Note2: The transfer mode register should not be set to any value other than those listed above. Note3: The execution state number shows number of best case (1-state memory access).
92CM27-42
2005-04-20
TMP92CM27
3.4.3
Interrupt Controller Operation
The block diagram in Figure 3.4.3 shows the interrupt circuits. The left-hand side of the diagram shows the interrupt controller circuit. The right-hand side shows the CPU interrupt request signal circuit and the halt release circuit. For each of the 62 interrupts channels there is an interrupt request flag (Consisting of a flip-flop), an interrupt priority setting register and a micro DMA start vector register. The interrupt request flag latches interrupt requests from the peripherals. The flag is cleared to zero in the following cases: * * * * * When reset occurs When the CPU reads the channel vector after accepted its interrupt When executing an instruction that clears the interrupt (Write DMA start vector to INTCLR register) When the CPU receives a micro DMA request When the micro DMA burst transfer is terminated
An interrupt priority can be set independently for each interrupt source by writing the priority to the interrupt priority setting register (e.g., INTEPAD or INTB01). 6 interrupt priorities levels (1 to 6) are provided. Setting an interrupt source's priority level to 0 (or 7) disables interrupt requests from that source. If interrupt request with the same level are generated at the same time, the default priority (The interrupt with the lowest priority or, in other words, the interrupt with the lowest vector value) is used to determine which interrupt request is accepted first. The 3rd and 7th bits of the interrupt priority setting register indicate the state of the interrupt request flag and thus whether an interrupt request for a given channel has occurred. The interrupt controller sends the interrupt request with the highest priority among the simultaneous interrupts and its vector address to the CPU. The CPU compares the priority value in the status register by the interrupt request signal with the priority value set; if the latter is higher, the interrupt is accepted. Then the CPU sets a value higher than the priority value by 1 (+1) in the CPU SR. Interrupt request where the priority value equals or is higher than the set value are accepted simultaneously during the previous interrupt routine. When interrupt processing is completed (after execution of the RETI instruction), the CPU restores the priority value saved in the stack before the interrupt was generated to the CPU SR. The interrupt controller also has registers (8 channels) used to store the micro DMA start vector. Writing the start vector of the interrupt source for the micro DMA processing (See Table 3.4.1), enables the corresponding interrupt to be processed by micro DMA processing. The values must be set in the micro DMA parameter register (e.g., DMAS and DMAD) prior to the micro DMA processing.
92CM27-43
2005-04-20
Interrupt controller Interupt request flag S R
V = 20H V = 24H
CPU 1 Interrupt mask F/F RESET Priority encoder IFF2 to 0 1 7 3 INTRQ2 to 0
Interrupt request signal to CPU
NMI
RESET Interrupt vector read Priority setting register
Dn A Dn + 1 Dn + 2 C
Q
INTWD
Decoder
B
EI 1 to 7 DI Interrupt level detect
D Q CLR 3 3 Interrupt request flag 6 6
Highest A priority B interrupt level select C (Highest priority is "7")
Y1 Y2 Y3 Y4 Y5 Y6
Interrupt request signal
If INTRQ2 to 0 IFF 2 to 0 then 1.
INT0 Reset
S R Interrupt request F/F read 45
V = 28H V = 2CH V = 30H V = 34H V = 38H V = 3CH V = 40H V = 44H V = 48H V = 4CH Interrupt vector generator
Q D0 D1
Dn + 3
1 2 3 4 5 6 7
Interrupt vector read Micro DMA acknowledge D2 D3 D4 D5 D6 D7
INT1 INT2 INT3 INT4 INT5 INT6 INT7 INTTA0 INTTA1
During IDLE1 During STOP
Figure 3.4.3 Block Diagram of Interrupt Controller
92CM27-44
V = D0H V = D4H V = D8H V = DCH V = E0H V = E4H V = E8H V = ECH Micro DMA start vector setting register
Interrupt vector V read
HALT release
Micro DMA counter zero interrupt
RESET INT0 to 7, Key input 8-input OR 8
Micro DMA request
INTTC0 INTTC1 INTTC2 INTTC3 INTTC4 INTTC5 INTTC6 INTTC7
Soft start 51 S
Selctor
D5 D4 D3 D2 D1 D0
D Q CLR 6
INTTC0
If IFF7 then 0 3
DMA0V DMA1V : DMA7V
RESET
0 1 2 3 4 5 6 7
A B C Micro DMA channel priority encoder
3
Micro DMA channel
TMP92CM27
2005-04-20
TMP92CM27
(1) Interrupt priority setting registers
Symbol INTE01 NAME INT0 & INT1 Enable
Address
7 I1C R
6
5
4 I1M0
3 I0C R
2 INT0 I0M2 0 INT2
1 I0M1 R/W
0 I0M0
D0H
INT1 I1M2 I1M1 R/W 0 INT3 I3M2 I3M1 R/W 0 INT5 I5M2 I5M1 R/W 0 INT7 I7M2 I7M1 R/W 0 INTTA1(Timer1) ITA1M2 ITA1M1 R/W 0 INTTA3(Timer3) ITA3M2 ITA3M1 R/W 0
INTE23
INT2 & INT3 Enable
D1H
I3C R
I3M0
I2C R
I2M2 0 INT4
I2M1 R/W
I2M0
INTE45
INT4 & INT5 Enable
D2H
I5C R
I5M0
I4C R
I4M2 0 INT6
I4M1 R/W
I4M0
INTE67
INT6 & INT7 Enable
D3H
I7C R
I7M0
I6C R
I6M2 0
I6M1 R/W
I6M0
INTETA01
INTTA0 & INTTA1 Enable INTTA2 & INTTA3 Enable INTTA4 & INT8/INTTA5 Enable INTTA6 & INT9/INTTA7 Enable
D4H
ITA1C R
ITA1M0
ITA0C R
INTTA0(Timer0) ITA0M2 ITA0M1 R/W 0 INTTA2(Timer2) ITA2M2 ITA2M1 R/W 0 INTTA4(Timer4) ITA4M2 ITA4M1 R/W 0 INTTA6(Timer6) ITA6M2 ITA6M1 R/W 0
ITA0M0
INTETA23
D5H
ITA3C R
ITA3M0
ITA2C R
ITA2M0
INTE8TA45
D6H
ITA5C R
INT8/INTTA5(Timer5) ITA5M2 ITA5M1 ITA5M0 R/W 0 INT9/INTTA7(Timer7) ITA7M2 ITA7M1 ITA7M0 R/W 0
ITA4C R
ITA4M0
INTE9TA67
D7H
ITA7C R
ITA6C R
ITA6M0
The state of an interrupt request flag
lxxM2 0 0 0 0 1 1 1 1
lxxM1 0 0 1 1 0 0 1 1
lxxM0 0 1 0 1 0 1 0 1
Function (Write) Disables interrupt request. Sets interrupt priority level to 1. Sets interrupt priority level to 2. Sets interrupt priority level to 3. Sets interrupt priority level to 4. Sets interrupt priority level to 5. Sets interrupt priority level to 6. Disables interrupt request.
92CM27-45
2005-04-20
TMP92CM27
Symbol INTES0
NAME INTRX0 & INTTX0 Enable INTRX1 & INTTX1 Enable INTRX2 & INTTX2 Enable INTRX3 & INTTX3 Enable
address
7 ITX0C R
6
5
4 ITX0M0
3 IRX0C R
2
1
0 IRX0M0
D8H
INTTX0 ITX0M2 ITX0M1 R/W 0 INTTX1 ITX1M2 ITX1M1 R/W 0 INTTX2 ITX2M2 ITX2M1 R/W 0 INTTX3 ITX3M2 ITX3M1 R/W 0 -
INTRX0 IRX0M2 IRX0M1 R/W 0 INTRX1 IRX1M2 IRX1M1 R/W 0 INTRX2 IRX2M2 IRX2M1 R/W 0 INTRX3 IRX3M2 IRX3M1 R/W 0 INTSBI0
ISBI0M2 ISBI0M1
INTES1
D9H
ITX1C R
ITX1M0
IRX1C R
IRX1M0
INTES2
DAH
ITX2C R
ITX2M0
IRX2C R
IRX2M0
INTES3
DBH
ITX3C R
ITX3M0
IRX3C R
IRX3M0
INTESB0
INTSBI0 Enable
DCH
-
-
ISBI0C
ISBI0M0
R Note: Write "0" 0
R/W INTSBI1
INTESB1
INTSBI1 Enable
DDH
-
-
-
-
ISBI1C
ISBI1M2
ISBI1M1
ISBI1M0
R Note: Write "0" 0 INTA
IHSC0M0
R/W
INTEAHSC0
INTA & INTHSC0 Enable INTB & INTHSC1 Enable INTTB00 & INTTB01 Enable
INTHSC0 DEH
IHSC0C IHSC0M2 IHSC0M1
R 0
R/W INTHSC1
IAC R
IAM2 0
IAM1 R/W
IAM0
INTEBHSC1
DFH
IHSC1C
IHSC1M2
IHSC1M1
IHSC1M0
R 0
R/W INTTB01
IBC R
INTB IBM2 IBM1 R/W 0 INTTB00
ITB00M2 ITB00M1
IBM0
INTETB0
E0H
ITB01C
ITB01M2
ITB01M1
ITB01M0
ITB00C
ITB00M0
R 0
R/W
R 0
R/W
The state of an interrupt request flag
lxxM2 0 0 0 0 1 1 1 1
lxxM1 0 0 1 1 0 0 1 1
lxxM0 0 1 0 1 0 1 0 1
Function (Write) Disables interrupt request. Sets interrupt priority level to 1. Sets interrupt priority level to 2. Sets interrupt priority level to 3. Sets interrupt priority level to 4. Sets interrupt priority level to 5. Sets interrupt priority level to 6. Disables interrupt request.
92CM27-46
2005-04-20
TMP92CM27
Symbol INTETB1
NAME INTTB10 & INTTB11 Enable INTTB20 & INTTB21 Enable INTTB30 & INTTB31 Enable INTTB40 & INTTB41 Enable INTTB50 & INTTB51 Enable INTTBOX (Overflow) Enable
address
7
ITB11C
6 INTTB11
ITB11M2
5
ITB11M1
4
ITB11M0
3
ITB10C
2
ITB10M2
1 INTTB10
ITB10M1
0
ITB10M0
E2H
R 0
R/W INTTB21
R 0
R/W INTTB20
INTETB2
E5H
ITB21C
ITB21M2
ITB21M1
ITB21M0
ITB20C
ITB20M2
ITB20M1
ITB20M0
R 0 -
R/W
R 0
R/W INTTB31/INTTB30
INTETB3
E6H
-
-
-
-
ITB3XC
ITB3XM2 ITB3XM1 ITB3XM0
R Note: Write "0" 0
R/W INTTB41/INTTB40
INTETB4
E7H
-
-
-
-
ITB4XC
ITB4XM2 ITB4XM1 ITB4XM0
R Note: Write "0" 0
R/W INTTB51/INTTB50
INTETB5
E8H
-
-
-
-
ITB5XC
ITB5XM2 ITB5XM1 ITB5XM0
R Note: Write "0" 0
R/W INTTBOX
INTETBOX
E9H
-
-
-
-
ITBOXC
ITBOXM2 ITBOXM1 ITBOXM0
R Note: Write "0" 0
R/W
The state of an interrupt request flag
lxxM2 0 0 0 0 1 1 1 1
lxxM1 0 0 1 1 0 0 1 1
lxxM0 0 1 0 1 0 1 0 1
Function (Write) Disables interrupt request. Sets interrupt priority level to 1. Sets interrupt priority level to 2. Sets interrupt priority level to 3. Sets interrupt priority level to 4. Sets interrupt priority level to 5. Sets interrupt priority level to 6. Disables interrupt request.
Note 1: The interruption level setting register of combination interruption should clear an interruption demand flag in an INTCLR register, before changing an INTSEL register. Moreover, re-set an interrupt level as a desired level.
92CM27-47
2005-04-20
TMP92CM27
Symbol
NAME
INTP0 & INTAD
address
7 IP0C R
6
5
4 IP0M0
3 IADC R
2
1
0 IADM0
INTEPAD
Enable
E4H
INTP0 IP0M2 IP0M1 R/W 0 INTTC1(DMA1)
ITC1M2 ITC1M1
INTAD IADM2 IADM1 R/W 0 INTTC0(DMA0)
ITC0M2 ITC0M1
INTETC01
INTTC0 & INTTC1
Enable
F0H
ITC1C
ITC1M0
ITC0C
ITC0M0
R 0
R/W INTTC3(DMA3)
R 0
R/W INTTC2(DMA2)
INTETC23
INTTC2 & INTTC3
Enable
F1H
ITC3C
ITC3M2
ITC3M1
ITC3M0
ITC2C
ITC2M2
ITC2M1
ITC2M0
R 0
R/W INTTC5(DMA5)
R 0
R/W INTTC4(DMA4)
INTETC45
INTTC4 & INTTC5
Enable
F2H
ITC5C
ITC5M2
ITC5M1
ITC5M0
ITC4C
ITC4M2
ITC4M1
ITC4M0
R 0
R/W INTTC7(DMA7)
R 0
R/W INTTC6(DMA6)
INTETC67
INTTC6 & INTTC7
Enable
F3H
ITC7C
ITC7M2
ITC7M1
ITC7M0
ITC6C
ITC6M2
ITC6M1
ITC6M0
R 0 NMI
R/W
R 0
R/W INTWD
INTNMWDT
NMI & INTWDT
Enable
EFH
INCNM R 0
-
-
-
ITCWD R 0
-
-
-
The state of an interrupt request flag
lxxM2 0 0 0 0 1 1 1 1
lxxM1 0 0 1 1 0 0 1 1
lxxM0 0 1 0 1 0 1 0 1
Function (Write) Disables interrupt request. Sets interrupt priority level to 1. Sets interrupt priority level to 2. Sets interrupt priority level to 3. Sets interrupt priority level to 4. Sets interrupt priority level to 5. Sets interrupt priority level to 6. Disables interrupt request.
Note 1: It is not set, even if it leads an interrupt request flag at the same time it inputted An interrupt request flag borrows from being set in X1x4 cycle.
NMI.
92CM27-48
2005-04-20
TMP92CM27
(2)
Symbol
External interrupt control
NAME address 7 6 5 4 3 2 1 0
NMIREE
IIMC0
Interrupt Input mode Control 0
F6H
(Prohibit RMW)
R/W 0
NMI
0:Falling 1:Falling and Rising
I7LE IIMC1 Interrupt Input mode Control 1
I6LE 0
INT6 0:Edge 1:Level I6EDGE
I5LE 0
INT5 0:Edge 1:Level I5EDGE
I4LE R/W 0
INT4 0:Edge 1:Level I4EDGE
I3LE 0
INT3 0:Edge 1:Level I3EDGE
I2LE 0
INT2 0:Edge 1:Level I2EDGE
I1LE 0
INT1 0:Edge 1:Level I1EDGE
I0LE 0
INT0 0:Edge 1:Level I0EDGE
FAH
(Prohibit RMW)
0
INT7 0:Edge 1:Level I7EDGE
R/W IIMC2 Interrupt Input mode Control 2
FBH
(Prohibit RMW)
0
INT7 0:Rising /High 1:Falling /Low
0
INT6 0:Rising /High 1:Falling /Low
0
INT5 0:Rising /High 1:Falling /Low
0
INT4 0:Rising /High 1:Falling /Low
0
INT3 0:Rising /High 1:Falling /Low
0
INT2 0:Rising /High 1:Falling /Low
0
INT1 0:Rising /High 1:Falling /Low
0
INT0 0:Rising /High 1:Falling /Low
IBLE IIMC3 Interrupt Input mode Control 3
IALE R/W 0
INTA 0:Edge 1:Level IAEDGE
I9LE 0
INT9 0:Edge 1:Level I9EDGE
I8LE 0
INT8 0:Edge 1:Level I8EDGE
10EH
(Prohibit RMW)
0
INTB 0:Edge 1:Level IBEDGE
R/W IIMC4 Interrupt Input mode Control 4
10FH
(Prohibit RMW)
0
INTB 0:Rising /High 1:Falling /Low
0
INTA 0:Rising /High 1:Falling /Low
0
INT9 0:Rising /High 1:Falling /Low
0
INT8 0:Rising /High 1:Falling /Low
Note 1: Disable INT0 to INTB before changing INT0 to B pins mode from "level" to "edge". Setting example for case of INT0:
DI LD LD NOP NOP NOP EI X = Don't care; "-" = No change. (IIMC2), XXXXXXX0B (INTCLR), 0AH ; change from "level" to "edge". ; Clear interrupt request flag. ; Wait EI execution.
Note 2: See electrical characteristics in section 4 for external interrupt input pulse width.
92CM27-49
2005-04-20
TMP92CM27
Function Setting of External Interrupt Pin (1/2) Interrupt Pin Shared pin Mode Rising edge INT0 PF0 Falling edge High level Low level Rising edge INT1 PF2 Falling edge High level Low level Rising edge INT2 PF4 Falling edge High level Low level Rising edge INT3 PF6 Falling edge High level Low level Rising edge INT4 PK0 Falling edge High level Low level Rising edge INT5 PK1 Falling edge High level Low level Rising edge INT6 PK2 Falling edge High level Low level Rising edge INT7 PK3 Falling edge High level Low level Rising edge INT8 PK4 Falling edge High level Low level Setting Method = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1
92CM27-50
2005-04-20
TMP92CM27
Function Setting of External Interrupt Pin (2/2) Interrupt Pin Shared pin Mode Rising edge INT9 PK5 Falling edge High level Low level Rising edge INTA PK6 Falling edge High level Low level Rising edge INTB PK7 Fallinf edge High level Low level Setting Method = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1 = 0, = 0 = 0, = 1 = 1, = 0 = 1, = 1
92CM27-51
2005-04-20
TMP92CM27
(3) Interrupt control
Symbol NAME address 7 6
DP49SEL
5
DP48SEL
4
DP47SEL
3
DP39SEL
2
DP37SEL
1
DP26SEL
0
DP24SEL
0 10CH INTSEL combination (Prohibit RMW) selection
Interruption
0:INTTB50 Interruption is effective 1:INTTB51 Interruption is effective
0
0:INTTB40 Interruption is effective 1:INTTB41 Interruption is effective
0
0:INTTB30 Interruption is effective 1:INTTB31 Interruption is effective
R/W 0
0:INTB Interruption is invalid 1:INTB Interruption is effective
0
0:INTA Interruption is invalid 1:INTA Interruption is effective
0
0:INTTA7 Interruption is effective 1:INT9 Interruption is effective
0
0:INTTA5 Interruption is effective 1:INT8 Interruption is effective
TBOF5ST
TBOF4ST
TBOF3ST
TBOF2ST
TBOF1ST
TBOF0ST
R/W 0
Read:
0
Read:
0
Read:
0
Read: 0:Interruption 1:Interruption generating Write: 0:"0" clear 1:Don't care
0
Read:
0
Read:
Interruption
INTST
generating flag
10DH (Prohibit RMW)
0:Interruptio n
0:Interruption 0:Interruption
0:Interruption 0:Interruption 1:Interruption 1:Interruption generating Write: 0:"0" clear 1:Don't care generating Write: 0:"0" clear 1:Don't care
un-generating un-generating un-generating un-generating un-generating generating Write: 0:"0" clear 1:Don't care
un-generating 1:Interruption 1:Interruption 1:Interruption generating generating Write: 0:"0" clear 1:Don't care Write: 0:"0" clear 1:Don't care
SIO
IR3LE 1
0:INTRX3 edge mode 1:INTRX3 level mode
IR2LE R/W 1
0:INTRX2 edge mode 1:INTRX2 level mode
IR1LE 1
0:INTRX1 1:INTRX1 level mode
IR0LE 1
0:INTRX0 1:INTRX0 level mode
SIMC
Interrupt control
F5H (Prohibit RMW)
W 0
Note: Write "1"
edge mode edge mode
Note 1: The default priorities 24, 26, 47 to 49 are making the interruption factor serve a double purpose. It is necessary to choose the interruption factor used in an interruption factor selection register. Therefore, interruption cannot be used simultaneously. Note 2: The default priority 50 is making the interruption factor serve a double purpose. The interruption factor assigned to this default priority 50 can be used simultaneously. Of which interruption factor interruption occurred should interrupt, and please check it in a generating flag register. Note 3: The interruption level setting register of combination interruption should clear an interruption demand flag in an INTCLR register, before changing an INTSEL register. Moreover, re-set an interrupt level as a desired level.
92CM27-52
2005-04-20
TMP92CM27
(4) Interrupt request flag clear register The interrupt request flag is cleared by writing the appropriate micro DMA start vector. For example, to clear the interrupt flag INT0, perform the following register operation after execution of the DI instruction. INTCLR 0AH Clears interrupt request flag INT0 Symbol INTCLR NAME Interrupt clear control address
F8H (Prohibit RMW)
7 0
6 0
5 0
4 -
3 -
2 0
1 0
0 0
W 0 0 Interrupt vector
(5) Micro DMA start vector registers This register assigns micro DMA processing to which interrupt source. The interrupt source with a micro DMA start vector that matches the vector set in this register is assigned as the micro DMA start source. When the micro DMA transfer counter value reaches "0", the micro DMA transfer end interrupt corresponding to the channel is sent to the interrupt controller, the micro DMA start vector register is cleared, and the micro DMA start source for the channel is cleared. Therefore, to continue micro DMA processing, set the micro DMA start vector register again during the processing of the micro DMA transfer end interrupt. If the same vector is set in the micro DMA start vector registers of more than one channel, the channel with the lowest number has a higher priority. Accordingly, if the same vector is set in the micro DMA start vector registers of two channels, the interrupt generated in the channel with the lower number is executed until micro DMA transfer is completed. If the micro DMA start vector for this channel is not set again, the next micro DMA is started for the channel with the higher number (Micro DMA chaining).
92CM27-53
2005-04-20
TMP92CM27
Symbol DMA0V
NAME DMA0 start vector DMA1 start vetor DMA2 start vector DMA3 start vector DMA4 start vector DMA5 start vector DMA6 start vector DMA7 start vector
address 100H
7
6
5
DMA0V5
4
DMA0V4
3
DMA0V3
2
DMA0V2
1
DMA0V1
0
DMA0V0
DMA0 start vector R/W 0 101H
DMA1V5
0
DMA1V4
0 0 DMA1 start vector
DMA1V3 DMA1V2
0
DMA1V1
0
DMA1V0
DMA1V
R/W 0 0
DMA2V4
0 0 DMA2 start vector
DMA2V3 DMA2V2
0
DMA2V1
0
DMA2V0
DMA2V
102H
DMA2V5
R/W 0 0
DMA3V4
0 0 DMA3 start vector
DMA3V3 DMA3V2
0
DMA3V1
0
DMA3V0
DMA3V
103H
DMA3V5
R/W 0 0
DMA4V4
0 0 DMA4 start vector
DMA4V3 DMA4V2
0
DMA4V1
0
DMA4V0
DMA4V
104H
DMA4V5
R/W 0 0
DMA5V4
0 0 DMA5 start vector
DMA5V3 DMA5V2
0
DMA5V1
0
DMA5V0
DMA5V
105H
DMA5V5
R/W 0 0
DMA6V4
0 0 DMA6 start vector
DMA6V3 DMA6V2
0
DMA6V1
0
DMA6V0
DMA6V
106H
DMA6V5
R/W 0 0
DMA7V4
0 0 DMA7 start vector
DMA7V3 DMA7V2
0
DMA7V1
0
DMA7V0
DMA7V
107H
DMA7V5
R/W 0 0 0 0 0 0
92CM27-54
2005-04-20
TMP92CM27
(6) Specification of a micro DMA burst Specifying the micro DMA burst function causes micro DMA transfer, once started, to continue until the value in the transfer counter register reaches 0. Setting any of the bits in the register DMAB which correspond to a micro DMA channel (as shown below) to 1 specifies that any micro DMA transfer on that channel will be a burst transfer. Symbol DMAB NAME DMA burst address 108H 0 0 0 7 DBST7 6 DBST6 5 DBST5 4 3 DBST4 DBST3 R/W 0 0 2 DBST2 0 1 DBST1 0 0 DBST0 0
92CM27-55
2005-04-20
TMP92CM27
(7) Notes The instruction execution unit and the bus interface unit in this CPU operate independently. Therefore if, immediately before an interrupt is generated, the CPU fetches an instruction which clears the corresponding interrupt request flag (Note), the CPU may execute this instruction in between accepting the interrupt and reading the interrupt vector. In this case, the CPU will read the default vector 0004H and jump to interrupt vector address FFFF04H. To avoid this, an instruction which clears an interrupt request flag should always be placed after a "DI" instruction. And in the case of setting an interrupt enable again by "EI" instruction after the execution of clearing instruction, execute "EI" instruction after clearing and more than 3-instructions (e.g., "NOP"x 1 times). If placed "EI" instruction without waiting "NOP" instruction after execution of clearing instruction, interrupt will be enable before request flag is cleared. Thus, when be changed interrupt request level to "0", change it after cleared corresponding interrupt request by INTCLR instruction. In the case of changing the value of the interrupt mask register by execution, disable an interrupt by "DI" instruction before execution of POP SR instruction. In addition, please note that the following two circuits are exceptional and demand special attention. In level mode INT0 to INTB are not an edge-triggered interrupt. Hence, in level mode the interrupt request flip-flop for INT0 to INTB does not function. The peripheral interrupt request passes through the S input of the flip-flop and becomes the Q output. If the interrupt input mode is changed from edge mode to level mode, the interrupt request flag is cleared automatically. If the CPU enters the interrupt response sequence as a result of INT x (x 0 to 7) going from "0" to "1", INTx must then be held at "1" until the interrupt response sequence has been completed. If INTx is set to Level mode so as to release a Halt state, INTx must be held at "1" from the time INTx changes from "0"to "1" until the Halt state is released. (Hence, it is necessary to ensure that input noise is not interpreted as a "0", causing INTx to revert to "0" before the Halt state has been released.) When the mode changes from level mode to edge mode, interrupt request flags which were set in level mode will not be cleared. Interrupt request flags must be cleared using the following sequence. DI LD (IIMC2),00H ; Changes from level to edge. LD (INTCLR),0AH ; Clears interrupt request flag. NOP ; Wait EI execution. NOP NOP EI The interrupt request flip-flop can only be cleared by a reset or by reading the serial channel receive buffer. It cannot be cleared by an instruction.
INT0 to INTB level mode
INTRX0 to INTRX3
Note:
The following instructions or pin input state changes are equivalent to instructions that clear the interrupt request flag. INT0 to INT 7: Instructions which switch to level mode after an interrupt request has been generated in edge mode. The pin input change from high to low after interrupt request has been generated in level mode. ("H" "L", "L" "H") INTRX0 to INTRX2: Instruction which read the receive buffer.
92CM27-56
2005-04-20
TMP92CM27
(8) About combination of an interruption factor
About the following interruption factor, interruption is made to serve a double purpose. Cautions are needed when using it.
1)INT8/INTTA5 The interruption table / interruption level setting register is made to serve a double purpose.Therefore, it cannot be used simultaneously. Micro DMA starting is also that only which or one of the two can be used. In order to change the interruption factor to be used, it is necessary to set up INTSEL. It disappears, even if interruption of INTTA5(8-bit timer 5) will occur, if INTSEL is set as "1." It disappears, even if interruption of INT8(INT8 terminal input) will occur, if INTSEL is set as "0." 2)INT9/INTTA7 The interruption table / interruption level setting register is made to serve a double purpose.Therefore, it cannot be used simultaneously.Micro DMA starting is also that only which or one of the two can be used. In order to change the interruption factor to be used, it is necessary to set up INTSEL.It disappears, even if interruption of INTTA7(8-bit timer 7) will occur, if INTSEL is set as "1." It disappears, even if interruption of INT9(INT9 terminal input) will occur, if INTSEL is set as "0." 3)INTTB31/INTTB30 The interruption table / interruption level setting register is made to serve a double purpose.Therefore, it cannot be used simultaneously.Micro DMA starting is also that only which or one of the two can be used. In order to change the interruption factor to be used, it is necessary to set up INTSEL.It disappears, even if interruption of INTTB30(16-bit timer 3) will occur, if INTSEL is set as "1." It disappears, even if interruption of INTTB31(16-bit timer 3) will occur, if INTSEL is set as "0." 4)INTTB41/INTTB40 The interruption table / interruption level setting register is made to serve a double purpose.Therefore, it cannot be used simultaneously.Micro DMA starting is also that only which or one of the two can be used. In order to change the interruption factor to be used, it is necessary to set up INTSEL.It disappears, even if interruption of INTTB40(16-bit timer 4) will occur, if INTSEL is set as "1." It disappears, even if interruption of INTTB41(16-bit timer 4) will occur, if INTSEL is set as "0." 5)INTTB51/INTTB50 The interruption table / interruption level setting register is made to serve a double purpose.Therefore, it cannot be used simultaneously.Micro DMA starting is also that only which or one of the two can be used. In order to change the interruption factor to be used, it is necessary to set up INTSEL.It disappears, even if interruption of INTTB50(16-bit timer 5) will occur, if INTSEL is set as "1." It disappears, even if interruption of INTTB51(16-bit timer 5) will occur, if INTSEL is set as "0." When you change an interruption factor, please change in the following procedures. It interrupts, an interruption level setting register is set as the ban on a demand, and an interruption demand flag is cleared.It is set as the interruption factor which uses an interruption combination selection register. An interrupt level is set as an interrupt level setting register.
92CM27-57
2005-04-20
TMP92CM27
3.5 Function Ports
TMP92CM27 has I/O port pins that are shown in Table 3.5.1 in addition to functioning as general-purpose I/O ports, these pins are also used by internal CPU and I/O functions. list I/O registers and their specifications. Table 3.5.1 Port Function(R: PD = with programmable pull-down register, U = with pull-up register) (1/2) Port Name Port 1 Port 6 Pin Name P10 to P17 P60 to P67 P71 P72 P73 Port 7 P74 P75 P76 P77 Port 8 P80 P81 P82 P83 P84 P85 P86 P87 Port 9 P90 P91 P92 P93 P94 P95 P96 Port A PA0 PA1 PA2 PA3 PA4 PA5 Port C PC0 PC1 PC2 PC3 PC4 PC5 Number of Pins 8 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O Output Output Output Output Output Output I/O I/O Output Output Output Output Output Output Output I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O R - - U U - U U U - - - - - - - - - - - - - - - - - - - - - - - - - - - I/O Setting Bit Bit Bit Bit Bit Bit Bit Bit Bit (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) Bit Bit (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Pin Name for built-in function D8 to D15 A16 to A23
WRLL
WRLU
R/ W
SRWR SRLLB SRLUB
WAIT CS0
CS1
CS2 CS3 / SDCS CS4 CS5 / WDTOUT BUSRQ BUSAK
SDWE
SDRAS SDCAS
SDLLDQM SDLUDQM SDCKE SDCLK RXD0 TXD0 SCLK0/ CTS0 RXD1 TXD1 SCLK1/ CTS1 SO0/SDA0 SI0/SCL0 SCK0 SO1/SDA1 SI1/SCL1 SCK1
92CM27 - 58
2005-04-20
TMP92CM27
Table 3.5.1 Port Function(R: PD = with programmable pull-down register, U = with pull-up register) (2/2) Port Name Port D Pin Name PD0 PD1 PD2 PD3 PD4 PD5 Port F PF0 PF1 PF2 PF3 PF4 PF5 PF6 Port J PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7 Port K PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7 Port L PL0 PL1 PL2 PL3 PL4 PL5 PL6 PL7 PM0 to PM7 PN0 to PN2 PN3 Number of Pins 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8 3 1 I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O Input Input Input Input Input Input Input Input I/O I/O I/O I/O I/O I/O I/O I/O Input Input Input R - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I/O Setting Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) Bit Bit Bit Bit Bit Bit Bit Bit (Fixed) (Fixed) (Fixed) Pin Name for built-in function HSSI0 HSSO0 HSCLK0 RXD2 TXD2 SCLK2/ CTS2 TA0IN/INT0 TA1OUT TA2IN/INT1 TA3OUT TA4IN/INT2 TA5OUT TA6IN/INT3 TB0OUT0 TB0OUT1 TB1OUT0 TB1OUT1 TB2OUT0/TB4OUT0 TB2OUT1/TB4OUT1 TB3OUT0/TB5OUT0 TB3OUT1/TB5OUT1 TB0IN0/INT4 TB0IN1/INT5 TB1IN0/INT6 TB1IN1/INT7 TB2IN0/INT8 TB2IN1/INT9 TB3IN0/INTA TB3IN1/INTB PG00/RXD3 PG01/TXD3 PG02/SCLK3/ CTS3 PG03/TA7OUT PG10/HSSI1 PG11/HSSO1 PG12/HSCLK1 PG13 AN0 to AN7/KI0 to KI7 AN8 to AN10 AN11/ ADTRG
Port M Port N
92CM27 - 59
2005-04-20
TMP92CM27
Table 3.5.2 I/O Port and Specifications (1/7) Port Port 1 Pin name P10 to P17 Input Port Output Port D8 to D15 bus Port 6 P60 to P67 Input Port Output Port A16 to A23 output Port 7 P71 Input Port (without pull up) Input Port (with pull up) Output Port
WRLL
X: Don't care I/O register PnCR PnFC PnFC2 0 0 1 None X 0 1 X 0 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 None None 1
Specification
Pn X X X X X X 0 1 X X 0 1 X X X X X 0 1 X X 0 1 X X 0 1 X X X X X
P72
Input Port (without pull up) Input Port (with pull up) Output Port
WRLU
P73
Input Port Output Port
P74
R/ W Input Port (without pull up) Input Port (with pull up) Output Port
SRWR
P75
Input Port (without pull up) Input Port (with pull up) Output Port
SRLLB
P76
Input Port (without pull up) Input Port (with pull up) Output Port
SRUB
P77
Input Port Output Port
WAIT
92CM27 - 60
2005-04-20
TMP92CM27
Table 3.5.2 I/O Port and Specification (2/7) Port Port 8 Pin name P80 Specification Output Port
CS0 output
X: Don't care I/O register PnCR PnFC PnFC2 0 None 1 0 None 1 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 None 0 0 1 1 1 1 0 1 1 1 1 1 1 1 None 0 0 1 1 None 0 0 1 1 None
Pn X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
P81
Output Port
CS1 output
P82
Output Port
CS2 output
P83
CS3 output SDCS output
P84
Reserved Output Port
CS4 output
P85
Output Port
CS5 output WDTOUT output
P86 to P87
Reserved Input Port Output Port
P86
BUSRQ
Reserved P87
BUSAK
Reserved Port 9 P90 to P96 P90 P91 P92 P93 P94 P95 P96 Output Port
SDWE SDRAS SDCAS
SDLLDQM SDLUDQM SDCKE SDCLK
92CM27 - 61
2005-04-20
TMP92CM27
Table 3.5.2 Port Port A Pin name PA0
I/O Port and Specifications (3/7) Specification Pn X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
X: Don't care I/O register PnCR PnFC PnFC2 0 0 None 1 0 0 1 0 0 0 1 0 0 1 1 0 1 1 1 0 0 None 1 0 0 1 1 0 1 0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 1 1 None
PA1
PA2
Input Port Output Port RXD0 input Input Port Output Port TXD0 output TXD0 (open drain) output Input Port Output Port SCLK0/ CTS0 input SCLK0 output Input Port Output Port RXD1 input Input Port Output Port TXD1 output TXD1 (open drain) output Input Port Output Port SCLK1/ CTS1 input SCLK1 output Input Port Output Port SO0 output SDA0 I/O SO0 (open drain) output SDA0 (open drain) I/O Input Port Output Port SI0 input SCL0 I/O SCL0 (open drain) I/O Input Port Output Port SCK0 input SCK0 output
PA3
PA4
PA5
0 0 0 1 None
Port C
PC0
PC1
PC2
0 0 0 0 1 1 0 0 0 1 1 None
92CM27 - 62
2005-04-20
TMP92CM27
Table 3.5.2 Port Port C Pin name PC3
I/O Port and Specifications (4/7) Specification Pn X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
X: Don't care I/O register PnCR PnFC PnFC2 0 0 0 1 0 0 0 1 0 1 1 0 0 1 1 1 1 1 0 0 0 1 0 0 0 1 0 0 1 1 1 1 1 None 0 0 1 0 0 1 1 1 0 0 None 1 0 0 1 0 0 None 1 0 1 1 0 0 None 1 0 1 1 0 0 None 1 0 0 1 0 0 0 1 0 0 1 1 0 1 1 1 None 0 0 1 0 0 1 1 1
PC4
PC5
Port D
PD0
PD1
PD2
PD3
PD4
PD5
Input Port Output Port SO1 output SDA1 I/O SO1 (open drain) output SDA1 (open drain) I/O Input Port Output Port SI1 input SCL1 I/O SCL1 (open drain) I/O Input Port Output Port SCK1 input SCK1 output Input Port Output Port HSSI0 input Input Port Output Port HSSO0 output Input Port Output Port HSCLK0 output Input Port Output Port RXD2 input Input Port Output Port TXD2 output TXD2 (open drain) output Input Port Output Port SCLK2/ CTS2 input SCLK2 output
92CM27 - 63
2005-04-20
TMP92CM27
Table 3.5.2 Port Port F Pin name PF0
I/O Port and Specifications (5/7) Specification Pn X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
X: Don't care I/O register PnCR PnFC PnFC2 0 0 0 1 0 0 0 1 0 0 1 1 0 0 None 1 0 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 None 1 0 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 None 1 0 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 None 0 0 1 0 1 1 0 0 1 0 1 1
PF1
PF2
PF3
PF4
PF5
PF6
Port J
PJ0
PJ1
PJ2
PJ3
Input Port Output Port TA0IN input INT0 input Input Port Output Port TA1OUT output Input Port Output Port TA2IN input INT1 input Input Port Output Port TA3OUT output Input Port Output Port TA4IN input INT2 input Input Port Output Port TA5OUT output Input Port Output Port TA6IN input INT3 input Input Port Output Port TB0OUT0 output Input Port Output Port TB0OUT1 output Input Port Output Port TB1OUT0 output Input Port Output Port TB1OUT0 output
92CM27 - 64
2005-04-20
TMP92CM27
Table 3.5.2 Port Port J Pin name PJ4
I/O Port and Specifications (6/7) Specification Pn X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
X: Don't care I/O register PnCR PnFC PnFC2 0 0 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 None 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1
PJ5
PJ6
PJ7
Port K
PK0
PK1
PK2
PK3
PK4
PK5
PK6
PK7
Input Port Output Port TB2OUT0 output TB4OUT0 output Input Port Output Port TB2OUT1 output TB4OUT1 output Input Port Output Port TB3OUT0 output TB5OUT0 output Input Port Output Port TB3OUT1 output TB5OUT1 output Input Port TB0IN0 input INT4 input Input Port TB0IN1 input INT5 input Input Port TB1IN0 input INT6 input Input Port TB1IN1 input INT7 input Input Port TB2IN0 input INT8 input Input Port TB2IN1 input INT9 input Input Port TB3IN0 input INTA input Input Port TB3IN1 input INTB input
92CM27 - 65
2005-04-20
TMP92CM27
Table 3.5.2 Port Port L Pin name PL0
I/O Port and Specifications (7/7) Specification Pn X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
X: Don't care I/O register PnCR PnFC PnFC2 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 None 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 None
PL1
PL2
Input Port Output Port PG00 output RXD3 input Input Port Output Port PG01 output TXD3 output TXD3 (open drain) output Input Port Output Port PG02 output
Port M Port N
SCLK3/ CTS3 input SCLK3 output PL3 Input Port Output Port PG03 output TA7OUT PL4 Input Port Output Port PG10 output HSSI1 input PL5 Input Port Output Port PG11 output HSSO1 output PL6 Input Port Output Port PG12 output HSCLK1 output PL7 Input Port Output Port PG13 output PM0 to PM7 Input Port/KEY IN input AN0 to AN7 input PN0 to PN2 Input Port AN8 to AN10 input PN3 Input Port/ ADTRG AN11 input
None
None
92CM27 - 66
2005-04-20
TMP92CM27
Input buffer state table (1/3) Input buffer state HALT state CPU Operation state STOP IDLE2 IDLE1 = 1
At function setup At function setup At function setup At function setup At input port setup At input port setup At input port setup At input port setup
STOP
Port name
Input Function name
Reset state
=0
At function setup At input port setup
-
P10 to P17
D8 to D15
OFF OFF ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
ON by externa l read.
D0 to D7
D0 to D7
OFF
-
OFF OFF OFF
- -
-
OFF OFF OFF
- -
-
OFF OFF OFF
- -
-
OFF OFF OFF
- -
ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
OFF OFF OFF OFF OFF
-
OFF OFF OFF OFF OFF
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
P60 to P67 A16 to A23 P71 to P72 - P74 to P76 (*1) - P73 P77 WAIT - P80 to P85 P86 BUSRQ - P87 - P90 to P96 PA0 RXD0 - PA1 SCLK0/ PA2
CTS0
OFF
- -
ON ON
-
OFF ON
-
OFF
OFF
OFF OFF
-
ON OFF ON ON OFF ON ON ON ON ON ON ON ON OFF ON OFF ON
ON OFF ON ON OFF ON ON ON ON ON ON ON ON OFF ON OFF ON
OFF ON OFF ON - - OFF OFF Controls by P9DR. OFF ON OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF ON ON OFF ON ON ON ON ON ON ON ON OFF ON OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF ON ON OFF ON ON ON ON ON ON ON ON OFF ON OFF ON
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
PA3 PA4 PA5 PC0 PC1 PC2 PC3 PC4 PC5 PD0 PD1 to PD2 PD3 PD4 PD5
RXD1
-
SCLK1/
CTS1
SDA0 SI0/SCL0 SCK0 SDA1 SI1/SCL1 SCK1 HSSI0
-
RXD2
-
SCLK2/
CTS2
92CM27 - 67
2005-04-20
TMP92CM27
Input buffer state table (2/3) Input buffer state HALT state CPU Operation state STOP IDLE2 IDLE1 = 1
At function setup At function setup At function setup At function setup At input port setup At input port setup At input port setup At input port setup
STOP
Port name
Input Function name
Reset state
=0
At function setup At input port setup
PF0 PF1 PF2 PF3 PF4 PF5 PF6 PJ0 to PJ7 PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7 PL0 PL1 PL2 PL3 PL4 PL5 to PL7
TA0IN INT0
-
ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
ON OFF ON OFF ON OFF ON OFF ON ON ON ON ON ON ON ON ON OFF ON OFF ON OFF
ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
ON OFF ON OFF ON OFF ON OFF ON ON ON ON ON ON ON ON ON OFF ON OFF ON OFF
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
ON OFF ON OFF ON OFF ON OFF ON ON ON ON ON ON ON ON ON OFF ON OFF ON OFF
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
ON OFF ON OFF ON OFF ON OFF ON ON ON ON ON ON ON ON ON OFF ON OFF ON OFF
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
TA2IN INT1
-
TA4IN INT2
-
TA6IN INT3
-
TB0IN0 INT4 TB0IN1 INT4 TB1IN0 INT4 TB1IN1 INT4 TB2IN0 INT4 TB2IN1 INT4 TB3IN0 INT4 TB3IN1 INT4 RXD3
-
OFF ON OFF OFF ON OFF OFF ON OFF OFF ON OFF OFF ON OFF ON OFF ON OFF ON OFF ON OFF ON OFF ON OFF ON OFF OFF OFF OFF OFF OFF
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
SCLK2/
CTS2
-
HSSI1
-
92CM27 - 68
2005-04-20
TMP92CM27
Input buffer state table (3/3) Input buffer state HALT state CPU Operation state STOP IDLE2 IDLE1 = 1 =0
At function setup At function setup At function setup At function setup At function setup At input port setup At input port setup At input port setup At input port setup At input port setup
STOP
Port name
Input Function name
PM0 to PM7
PN0 to PN3
AN0 to AN7 KEY0 to KEY7 AN8 to AN11
OFF
Reset state
OFF ON
ON
OFF ON
OFF
OFF ON
OFF
OFF ON
OFF
OFF ON
OFF
OFF
OFF
ON
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
- PN3 ON ON ON ON ON ADTRG ON : The buffer is always turned on. A current flows the input buffer if the input pin is not driven. OFF : The buffer is always turned off. : No applicable
*1 : Port having a pull-up/pull-down resistor. *2 : AIN input does not cause a current to flow through the buffer. *3 : It becomes an input port after reset and an input buffer turns on during reset at AM 0= 0 and AM1= 1.
92CM27 - 69
2005-04-20
TMP92CM27
Output buffer state table (1/3) Output buffer state HALT state CPU Operation state STOP IDLE2 IDLE1 = 1
At function setup At function setup At function setup At function setup At input port setup At input port setup At input port setup At input port setup
STOP
Port name
Output Function name
Reset state
=0
At function setup At input port setup
-
D0 to D7 P10 to P17
OFF
ON by external write.
D0 to D7 D8 to D15
OFF
-
ON OFF ON
-
OFF OFF ON
-
OFF OFF ON
-
OFF OFF OFF
ON ON
ON ON
ON ON
ON ON
OFF OFF
P60 to P67 A16 to A23 P71 WRLL P72 WRLU P73 R/ W P74 SRWR P75 SRLLB P76 SRLUB - P77 P80 CS0 P81 CS1 P82 CS2 P83 CS3 / SDCS P84 CS4 P85 P86 P87 P90 P91 P92 P93 P94 P95 P96 PA0 PA1 PA2 PA3 PA4 PA5
CS5 / WDTOUT
ON
ON
OFF
ON
ON
ON
ON
ON
ON
ON
ON
OFF
OFF
OFF ON ON ON ON ON ON OFF OFF
-
ON
-
ON
-
ON
-
ON
-
OFF
ON
ON
ON
ON
ON
ON
ON
ON
OFF
OFF
-
BUSAK SDWE SDRAS SDCAS
-
ON
ON ON
-
ON
ON ON
-
ON
ON ON
-
On
ON ON
-
OFF
OFF OFF
=1:ON ON ON ON =0:OFF
SDLLDQM SDLUDQM SDCKE SDCLK
-
TXD0 SCLK0
-
TXD1 SCLK1
OFF OFF OFF OFF OFF OFF
OFF ON ON OFF ON ON
ON ON ON ON ON ON
OFF ON ON OFF ON ON
ON ON ON ON ON ON
OFF ON ON OFF ON ON
ON ON ON ON ON ON
OFF ON ON OFF ON ON
ON ON ON ON ON ON
OFF OFF OFF OFF OFF OFF
OFF OFF OFF OFF OFF OFF
92CM27 - 70
2005-04-20
TMP92CM27
Output buffer state table (2/3) Output buffer state HALT state CPU Operation state STOP IDLE2 IDLE1 = 1
At function setup At function setup At function setup At function setup At input port setup At input port setup At input port setup At input port setup
STOP
Port name
Output Function name
Reset state
=0
At function setup At input port setup
PC0 PC1 PC2 PC3 PC4 PC5 PD0 PD1 PD2 PD3 PD4 PD5 PF0 PF1 PF2 PF3 PF4 PF5 PF6 PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7 PK0 to PK7
SO0/SDA0 SCL0 SCK0 SO1/SDA1 SCL1 SCK1
-
HSSO0 HSCLK
-
TXD2 SCLK2
-
TA1OUT
-
TA3OUT
-
TA5OUT
-
TB0OUT0 TB0OUT1 TB1OUT0 TB1OUT1 TB2OUT0/ TB4OUT0 TB2OUT1/ TB4OUT1 TB3OUT0/ TB5OUT0 TB3OUT1/ TB5OUT1
-
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
ON ON ON ON ON ON OFF ON ON OFF ON ON OFF ON OFF ON OFF ON OFF ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
ON ON ON ON ON ON OFF ON ON OFF ON ON OFF ON OFF ON OFF ON OFF ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
ON ON ON ON ON ON OFF ON ON OFF ON ON OFF ON OFF ON OFF ON OFF ON ON ON ON ON ON ON ON
-
ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
ON ON ON ON ON ON OFF ON ON OFF ON ON OFF ON OFF ON OFF ON OFF ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
92CM27 - 71
2005-04-20
TMP92CM27
Output buffer state table (3/3) Output buffer state HALT state CPU Operation state STOP IDLE2 IDLE1 = 1
At function setup At function setup At function setup At function setup At input port setup At input port setup At input port setup At input port setup
STOP
Port name
Output Function name
Reset state
=0
At function setup At input port setup
PL0 PL1 PL2 PL3 PL4 PL5 PL6 PL7 PM0 to PM7 PN0 to PN3 ON
PG00 PG01/ TXD3 PG02/ SCLK3 PG03/ TA7OUT PG10 PG11/ HSSO1 PG12/ HSCLK1 PG13
- -
OFF OFF OFF OFF OFF OFF OFF OFF
ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON
- -
ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON
ON ON ON ON ON ON ON ON
OFF OFF OFF OFF OFF OFF OFF OFF
OFF OFF OFF OFF OFF OFF OFF OFF
: The buffer is always turned on. However, the output buffer of a specific terminal turns OFF at the time of bus release. OFF : The buffer is always turned off. : No applicable *1 : Port having a pull-up/pull-down resistor.
92CM27 - 72
2005-04-20
TMP92CM27
3.5.1
Port 1 (P10 to P17)
Port1 is 8-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register P1CR and function register P1FC. In addition to functioning as a general-purpose I/O port, port1 can also function as a data bus (D8 to D15). Moreover, with the combination of AM1 and AM0 shown below, Port1 is set as the following function after reset release.
AM1 0 0 1 1
Reset Direction control (on bit basis) P1CR write Function control Internal data bus P1FC write
R
AM0 0 1 0 1
Function Setting after Reset is Released Don't use this setting Data bus (D8 to D15) Input port (P10 to P17) Don't use this setting
External access(Data write)
Output latch P1 write D8 to D15
A
S Port 1 P10 to P17 (D8 to D15)
Selector Output buffer B
P1 Read
External access(Data read)
Figure 3.5.1
Port 1
92CM27 - 73
2005-04-20
TMP92CM27
Port 1 register
7
P0 P1 (0000H) (0004H) bit Symbol Read/Write After reset P17
6
P16
5
P15
4
P14 R/W
3
P13
2
P12
1
P11
0
P10
Data from external port(Output latch register is cleared to "0")
Port 1 Control register
7
P1CR (0006H) bit Symbol Read/Write After reset Function 0 P17C
6
P16C 0
5
P15C 0
4
P14C W 0
3
P13C 0
2
P12C 0
1
P11C 0
0
P10C 0
Refer to following table
Port 1 Function register
7
P1FC (0007H) bit Symbol Read/Write After reset Function
6
5
4
W
3
2
1
0
P1F 0/1*
Refer to following table
Port 1 function setting Note 1) Read-modify-write is prohibited for P1CR,P1FC. Note 2) is bit X of P1CR register. Note 3) At AM1=0 and AM0=1, it is after reset P1F="1". At AM1=1 and AM0=0, it is after reset P1F="0". 1 Output port Reserved P1FC 0 P1CR 0 Input port Data bus (D15 to D8) 1
Figure 3.5.2
Port 1 register
92CM27 - 74
2005-04-20
TMP92CM27
3.5.2 Port 6 (P60 to P67)
Port6 is 8-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register P6CR and function register P6FC. In addition to functioning as a general-purpose I/O port, port6 can also function as an address bus (A16 to A23). Moreover, with the combination of AM1 and AM0 shown below, Port6 is set as the following function after reset release.
AM1 0 0 1 1 AM0 0 1 0 1 Function Setting after Reset is Released Don't use this setting Address bus(A16 to A23) Address bus(A16 to A23) Don't use this setting
Reset
Direction control (on bit basis) P6CR write Function control (on bit basis) Internal data bus P6FC write R Output latch
Bus release state 1release 0un-release
S Selector A A
P6 write
B B
Output buffer
Port 6 P60 to P67 (A16 to A23)
A16 to A23 S Selector B
P6 read
A
Figure 3.5.3
Port 6
92CM27 - 75
2005-04-20
TMP92CM27
Port 6 register
7
P0 P6 (0000H) (0018H) bit Symbol Read/Write After reset
6
P66
5
P65
4
P64 R/W
3
P63
2
P62
1
P61
0
P60
P67
Data from external port(Output latch register is cleared to "0")
Port 6 Control register
7
P6CR (001AH) bit Symbol Read/Write After reset Function
6
P66C 0
5
P65C 0
4
P64C W 0
3
P63C 0
2
P62C 0
1
P61C 0
0
P60C 0
P67C 0
0:Input 1:Output
Port 6 Function register
7
P6FC (001BH) bit Symbol Read/Write After reset Function
6
P66F 1
5
P65F 1
4
P64F W 1
3
P63F 1
2
P62F 1
1
P61F 1
0
P60F 1
P67F 1
0:Port 1:Address bus(A16 to A23)
Figure 3.5.4
Port 6 register
Note) Read-modify-write is prohibited for P6CR,P6FC.
92CM27 - 76
2005-04-20
TMP92CM27
3.5.3
Port 7 (P71 to P77)
Port 71 to P77 is a 7-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register P7CR and function register P7FC. Moreover, P71, P72 and P74 to P76 are ports with pull-up resistance. There is an external memory interface function in addition to a general-purpose I/O port function. P71 to P77 become input mode after reset.
(1)P71,P72,P74,P75,P76
Reset Direction control (on bit basis) P7CR write Function control (on bit basis) Internal data bus P7FC write S Output latch
Bus release state 1 : release 0 : un-release
S Selector A
P-ch Programmable Pull-up Port 7 Output buffer
P71( WRLL ) P72( WRLU ) P74( SRWR ) P75( SRLLB )
P7 write
WRLL , WRLU
SRWR
B
S Selector
SRLLB , SRLUB
B
P76( SRLUB )
P7 read
A
Figure 3.5.5 Note) When a terminal is set as
WRLL
Port 7(P71,P72,P74,P75,P76) ,
SRWR
,
WRLU
,
SRLLB
,
SRLUB
and
WAIT
, at the time of bus release, an
output buffer is not concerned with an output setup of control register P7CR, but is turned OFF.
92CM27 - 77
2005-04-20
TMP92CM27
(2) P73 ( R/ W )
Reset Direction control (on bit basis) P7CR write Function control (on bit basis) Internal data bus P7FC write S Output latch
Bus release state 1 : release 0 : un-release
A Selector
S Port 7 Output buffer
P73(R/ W )
P7 write
B R/ W SB Selector
P7 read
A
Figure 3.5.6
Port 7(P73)
Note) When a terminal is set as R/ W , at the time of bus release, an output buffer is not concerned with an output setup of control register P7CR, but is turned OFF.
92CM27 - 78
2005-04-20
TMP92CM27
(3) P77( WAIT )
Reset Direction control (on bit basis) P7CR write Function control (on bit basis) Internal data bus P7FC write S Output latch
P7 write Output buffer S Selector B A
Port 7
P77( WAIT
)
P7 read
WAIT
Figure 3.5.7
Port 7(P77)
92CM27 - 79
2005-04-20
TMP92CM27
Port 7 register
7
P7 (001CH) bit Symbol Read/Write After reset Function -
6 P76
5 P75
4 P74
3 P73 R/W
2 P72
1 P71
P77
Data from external port(Output latch register is set to "1") 0:Pull-up register OFF 1:Pull-up register ON 0:Pull-up register OFF 1:Pull-up register ON -
Port 7 Control register
7
P7CR (001EH) bit Symbol Read/Write After reset
6 P76C 0
5 P75C 0
4 P74C W 0
0: Input
3 P73C 0
1: Output
2 P72C 0
1 P71C 0 -
P77C 0
Port 7 Function register
P7FC (001FH)
bit Symbol Read/Write After reset Function
7 P77F 0
0: Port 1: WAIT
6 P76F 0
0: Port 1: SRLUB
5 P75F 0
0: Port 1: SRLLB
4 P74F W 0
0: Port 1: SRWR
3 P73F 0
0: Port 1: R/ W
2 P72F 0
0: Port 1: WRLU
1 P71F 0
0: Port 1: WRLL -
Port 7 function setting

P77
Input port Output port
P76
Input port Output port Reserved
P75
Input port Output port Reserved
P74
Input port Output port Reserved
P73
Input port Output port Reserved
P72
Input port Output port Reserved
P71
Input port Output port Reserved -
0 0 1 1
0 1 0 1
WAIT
Reserved
SRLUB
SRLLB
SRWR
R/ W
WRLU
WRLL
Note 1) When using P71,P72 and P74 to P76 in input mode, built-in pull-up resistance is controlled by port7 register. When using it, making input mode ot I/O mode intermingled, a Read-modigy-write is forbidden(When at least 1 bit of input terminals exists). A setup of built-in pull-up resistance may change according to the state of an input terminal. Note 2) Read-modify-write is prohibited for P7CR and P7FC. Note 3) In the case of a port function, about pull-up ON/OFF, it controls by the value of P7. When using it asafunction, it controls by the value of a function. Figure 3.5.8 Port 7 register
92CM27 - 80
2005-04-20
TMP92CM27
3.5.4
Port 8 (P80 to P87)
P80 to P85 are a port only for outputs. P86 and P87 are general-purpose I/O ports.
There are the following functions in addition to an output and a general-purpose I/O port. The output function of a standard chip select signal( CS0 , CS1 , CS2 , CS3 , CS4 , CS5 ). The output function of the chip select signal for SDRAM( SDCS ). The I/O function of a bus release function( BUSRQ , BUSAK ). The output function of a watchdog timer( WDTOUT ). These functions operate by setting the bit concerned of P8CR, P8FC and P8FC2 register. The value of each register of P8CR, P8FC, and P8FC2 is reset in "0" by the reset operation, P80 to P84 becomes an output port, P85 becomes WDTOUT output, and P86 and P87 become the input ports. Moreover, P82 is reset in "0" as for the output latch, and P80, P81, and P83 to P87 are set in "1".
(1) P80( CS0 ), P81( CS1 ), P84( CS4 )
P80, P81, and P84 function as standard chip select signal output ( CS0 , CS1, CS4 ) besides the output port function.
Reset
Bus release state 1 : release 0 : un-release Function control (on bit basis) P8FC write
Internal data bus
S Output latch
A
S
P8 write
Selector B
CS0 , CS1 , CS4
P80( CS0 ) P81( CS1 ) P84( CS4 )
P8 read
Figure 3.5.9
Port 8(P80,P81,P84)
92CM27-81
2005-04-20
TMP92CM27
(2) P82( CS2 ) P82 functions as standard chip select signal output ( CS2 ) besides the output port function.
Reset
Bus release state 1 : release 0 : un-release
Function control (on bit basis)
P8FC write Internal data bus R Output latch S P82( CS2 )
A
P8 write
Selector B
CS2
P8 read
Figure 3.5.10
Port 8(P82)
92CM27-82
2005-04-20
TMP92CM27 (3) P83( CS3 , SDCS )
P83 functions as standard chip selection signal output ( CS3 ) and chip select signal output ( SDCS ) for SDRAM besides the output port function.
Bus release state 1 : release 0 : un-release
Reset
Function control (on bit basis)
P8FC write Internal data bus S Output latch
A
S P83( CS3 ) ( SDCS )
P8 write Function control (on bit basis)
Selector B
P8FC2 write
P8 read
CS3
SDCS
A
S
Selector B
Figure 3.5.11
Port 8(P83)
92CM27-83
2005-04-20
TMP92CM27
(4)P85( CS5 ) P85 functions as standard chip select signal output ( CS5 ) and watchdog timer signal output ( WDTOUT ) besides the output port function.
Bus release state 1 : release 0 : un-release
Reset
S Function control (on bit basis) P8FC write Internal data bus S Output latch
A
S P85( CS5 ) ( WDTOUT )
P8 write S Function control (on bit basis) P8FC2 write
Selector B
P8 read
CS5
A
S
WDTOUT
Selector B
Figure 3.5.12
Port 8(P85)
92CM27-84
2005-04-20
TMP92CM27
(5)P86( BUSRQ ) P86 functions as input ( BUSRQ ) of the function of bus open besides the I/O port function.
Reset
Direction control (on bit basis) P8CR write Internal data bus S Output latch P8 write P86( BUSRQ )
Function control (on bit basis) P8FC write SA Selector B
P8 read
BUSRQ
Figure 3.5.13
Port 8(P86)
92CM27-85
2005-04-20
TMP92CM27
(6)P87( BUSAK ) P87 functions as output ( BUSAK ) of the function of bus open besides the I/O port function.
Reset
Function control (on bit basis) P8FC write Internal data bus Direction control (on bit basis) P8CR write P87( BUSAK ) S Output latch P8 write
BUSAK
AS Selector B
S
A
P8 read
Selector B
Figure 3.5.14
Port 8(P87)
92CM27-86
2005-04-20
TMP92CM27
Port 8 register
7
P8 (0020H) bit Symbol Read/Write
6
P86
5
P85 1
4
P84 R/W 1
3
P83 1
2
P82 0
1
P81 1
0
P80 1
P87
Data from external port After reset (Output latch register is set to "1"
Port 8 Control register
7
P8CR (0021H) bit Symbol Read/Write After reset Function
6
P86C W 0
1: Output
5
4
3
2
1
0
P87C 0
0: Input
Port 8 Function register
7
P8FC (0022H) bit Symbol Read/Write After reset Function
6
P86F 0
0: Port
5
P85F 1
0: Port
4
P84F W 0
0: Port
3
P83F 0
0: Port
2
P82F 0
0: Port
1
P81F 0
0: Port 1: CS1
0
P80F 0
0: Port 1: CS0
P87F 0
0: Port 1: BUSAK
1: BUSRQ 1: 1: CS4
1: 1: CS2
Port 8 Function register 2
7
P8FC2 (0023H) bit Symbol Read/Write After reset Function
6
5
P85F2 W 1
0: CS5 1: WDTOUT
4
3
P83F2 W 0
0: CS3 1: SDCS
2
1
0
P85 function setting

P83 function setting

0
Port Reserved
1
CS5 WDTOUT

0
Port Reserved
1
CS3
SDCS
0 1
0 1
Note 1) Read-modify-write is prohibited for P8CR, P8FC and P8FC2. Note 2) Don't do "1" to P8 register in the write before setting P82 to CS2 after releasing reset. The period when (P8FC=1) that sets the function register after the value of the output latch of P82 is made "1" (P8=1) and the output are not normally output exists and it is likely not to operate correctly. Note 3) Use and set word instruction (LDW (P8FC),xxxxH) when you set P82 as CS2 . Figure 3.5.15 Port 8 register
92CM27-87
2005-04-20
TMP92CM27
3.5.5
Port 9 (P90 to P96)
P90 to P96 are a port only for outputs. There are the following functions in addition to an output port. The output function of a SDRAM controller ( SDWE , SDRAS , SDCAS , SDLLDQM, SDLUDQM, SDCKE, SDCLK). These functions operate by setting the bit concerned of P9FC register. The value of P9FC is reset in "0" by the reset operation, and P95 to P90 becomes an output port. The value of P9FC is set in "1", and P96 becomes SDCLK function output. Moreover, all bits of the output latch are set in "1". Port 9 can bitting set the output in HALT. It sets it by the P9DR register.
Bus release state 1 : release 0 : un-release
Reset
Function control (on bit basis) P9FC write Internal data bus S Output latch AS Selector B
SDWE SDRAS SDCAS
P90( SDWE ) P91( SDRAS ) P92( SDCAS ) P93(SDLLDQM) P94(SDLUDQM) P95(SDCKE)
P9 write
SDLLDQM SDLUDQM SDCKE
P9 read
Figure 3.5.16
Port 9(P90 to P95)
92CM27-88
2005-04-20
TMP92CM27
Reset Bus release state 1 : release 0 : un-state
Function control (on bit basis) P9FC write Internal data bus S Output latch S P96(SDCLK)
A
P9 write
Selector B
SDCLK
P9 read
Figure 3.5.17
Port 9(P96)
92CM27-89
2005-04-20
TMP92CM27
Port 9 register
7
P9 (0024H) bit Symbol Read/Write After reset
6
P96 1
5
P95 1
4
P94 1
3
P93 R/W 1
2
P92 1
1
P91 1
0
P90 1
Port 9 Function register
7
P9FC (0027H) bit Symbol Read/Write After reset Function
6
P96F 1
0:Port 1:SDCLK
5
P95F 0
4
P94F 0
3
P93F W 0
2
P92F 0
1
P91F 0
0:Port 1: SDRAS
0
P90F 0
0:Port 1: SDWE
0:Port 0:Port 0:Port 0:Port 1:SDCKE 1:SDLUDQM 1:SDLLDQM 1: SDCAS
Port 9 Drive register
7
P9DR (0025H) bit Symbol Read/Write After reset Function
6
P96D 1
5
P95D 1
4
P94D 1
3
P93D R/W 1
2
P92D 1
1
P91D 1
0
P90D 1
0: The inside of HALT is high impedance
1: The inside of HALT is also driven
(The purpose of use and the usage) This register sets up the state of each pin at the time of standby mode. Set the state of the pin expected before the "HALT" command as a register. CPU serves as enable, after executing a "HALT" command. It becomes effective in all the standby modes that have three kinds.(IDLE2,IDLE1, or STOP mode) The state of I/O is shown in the following tables. OE 1 1 P9nD 0 1 Output buffer OFF ON Input buffer OFF OFF
Note 1) OE means the output enable signal before the mode of the standby. Note 2) "n" of P9nD means the bit number of PORT9.
Note) Read-modify-write is prohibited for P9FC.
Figure 3.5.18
Port 9 register
92CM27-90
2005-04-20
TMP92CM27
3.5.6 Port A (PA0 to PA5)
Port A is an 6-bit general-purpose I/O port. PA1 and PA4 can be set as an open drain output. There are the following functions in addition to an I/O port. The I/O function of the serial cannel 0(RXD0, TXD0, SCLK0/ CTS0 ). The I/O function of the serial cannel 1(RXD1, TXD1, SCLK1/ CTS1 ). These functions operate by setting the bit concerned of PACR, PAFC and PAFC2 register. All the bits of PACR, PAFC and PAFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1". (1)PA0(RXD0),PA3 (RXD1) PA0 and PA3 have a function as a RXD input of the serial channel 0 and 1 in addition to an I/O port.
Reset Direction control (on bit basis) PACR write
Internal data bus
Function cntrol (on bit basis) PAFC write S Output latch PA write SB Selector PA read A PA0 (RXD0) PA3 (RXD1)
RXD0 RXD1
Figure 3.5.19
Port A(PA0,PA3)
92CM27-91
2005-04-20
TMP92CM27
(2)PA1(TXD0),PA4 (TXD1) PA1 and PA4 have a function as a TXD output of the serial channel 0 and 1 in addition to an I/O port. Moreover, when using it as an TXD output of the serial bus interfaces 0 and 1, the output buffer has the open drain function in which a program is possible. An open drain function can be set up by the PAFC and PACR register.
Reset
Direction control (on bit basis) PACR write Function control (on bit basis) Internal data bus PAFC write Function control (on bit basis) PAFC2 write S Output latch PA write TXD0,TXD1 PA read AS Selector B S B Open drain control
Open drain setup is possible. =11,=1 =11,=1
PA1 (TXD0) PA4 (TXD1)
Selector
Figure 3.5.20
Port A(PA1,PA4)
92CM27-92
2005-04-20
TMP92CM27
(3)PA2( CTS0 ,SCLK0),PA5( CTS1 ,SCLK1) PA2 and PA5 have a function as an
Reset Direction control (on bit basis) PACR write Function control (on bit basis) PAFC write S Output latch PA write A S PA2 (SCLK0, CTS0 ) PA5 (SCLK1, CTS1 )
CTS
input or SCLK I/O in addition to the I/O port.
Internal data bus
Selector B
SCLK0 output SCLK1 output
SB Selector
PA read
CTS0 ,SCLK0 input CTS1 ,SCLK1 input
A
Figure 3.5.21
Port A(PA2,PA5)
92CM27-93
2005-04-20
TMP92CM27
Port A register
7
PA (0028H) bit Symbol Read/Write After reset
6
5
PA5
4
PA4
3
PA3 R/W
2
PA2
1
PA1
0
PA0
Data from external port(Output latch register is set to "1")
Port A Control register
7
PACR (002AH) bit Symbol Read/Write After reset
6
5
PA5C 0
4
PA4C 0
3
PA3C W 0
2
PA2C 0
1
PA1C 0
0
PA0C 0
Refer to following table
Port A Function register
7
PAFC (002BH) bit Symbol Read/Write After reset Function
6
5
PA5F 0
4
PA4F 0
3
PA3F W 0
2
PA2F 0
1
PA1F 0
0
PA0F 0
Refer to following table
Port A Function register 2
7
bit Symbol Read/Write After reset Function
6
5
4
PA4F2 W 0
Refer to following table
3
2
1
PA1F2 W 0
Refer to following table
0
Port A function setting



PA5
Input port Output port
SCLK1/ CTS1
PA4
Input port Output port Reserved TXD1(O.D Dis) Reserved Reserved Reserved TXD1(O.D Ena)
PA3
Input port Output port RXD1 Reserved
PA2
Input port Output port
SCLK0/ CTS0
PA1
Input port Output port Reserved TXD0(O.D Dis) Reserved Reserved Reserved TXD0(O.D Ena)
PA0
Input port Output port RXD0 Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
SCLK1
SCLK0
Note 1) Read-modify-write is prohibited for PACR, PAFC and PAFC2. Note 2) RXD0/1, SCLK0/1, CTS0 and CTS1 input are inputted into the serial bus interface 0 and 1 irrespective of a functional setup of a port. Note 3) PA1 and PA4 do not have a register for 3-state/open drain setup. Moreover, there is no open drain function at the time of an output port. Figure 3.5.22 Port A register
92CM27-94
2005-04-20
TMP92CM27 3.5.7 Port C(PC0 to PC5)
Port C is an 6-bit general-purpose I/O port. PC0, PC1, PC3 and PC4 can be set as an open drain output. There are the following functions in addition to an I/O port. The I/O function of the serial bus interface 0(SO0/SDA0, SI0/SCL0, SCK0). The I/O function of the serial bus interface 1(SO1/SDA1, SI1/SCL1, SCK1). These functions operate by setting the bit concerned of PCCR, PCFC and PCFC2 register. All the bits of PCCR, PCFC and PCFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1". (1)PC0(SO0/SDA0),PC3 (SO1/SDA1) PC0 and PC3 have a function as I/O of the serial bus interface 0 and 1 in addition to an I/O port. Moreover, when using it as an output of the serial bus interfaces 0 and 1, the output buffer has the open drain function in which a program is possible. An open drain function can be set up by the PCFC and PCCR register.
Reset
Direction control (on bit basis) PCCR write Function control (on bit basis) Internal data bus PCFC write S Output latch PC write
A
S
Open drain setup is possible. =11,=1 =11,=1
Selector B
PC0(SDA0, SO0), PC3(SDA1, SO1)
SDA0/SDA1 output SO0/SO1 output Function control (on bit basis) PCFC2 write SB Selector PC read SDA0/SDA1 input A
Open drain control
Figure 3.5.23
Port C(PC0,PC3)
92CM27-95
2005-04-20
TMP92CM27
(2)PC1(SI0/SCL0),PC4 (SI1/SCL1) PC1 and PC4 have a function as I/O of the serial bus interface 0 and 1 in addition to an I/O port. Moreover, when using it as an output of the serial bus interfaces 0 and 1, the output buffer has the open drain function in which a program is possible. An open drain function can be set up by the PCFC and PCCR register.
Reset
Direction control (on bit basis) PCCR write Function control (on bit basis) Internal data bus PCFC write S Output latch PC write
A
S
Open drain setup is possible. =11,=1 =11,=1
Selector B
PC1(SCL0,SI0) PC4(SCL1,SI1)
SCL0 output SCL1 output Function control (on bit basis) PCFC2 write SB Selector PC read SCL0/SI0 input SCL1/SI1 input A
Open drain control
Figure 3.5.24
Port C(PC1,PC4)
92CM27-96
2005-04-20
TMP92CM27
(3)PC2(SCK0),PC5 (SCK1) PC2 and PC5 have a function as I/O of the serial bus interface 0 and 1 in addition to an I/O port.
Reset
Direction control (on bit basis) PCCR write Function control (on bit basis) Internal data bus PCFC write S Output latch PC write SCK0 output SCK1 output
A
S PC2(SCK0), PC5(SCK1)
Selector B
SB Selector PC read SCK0 input SCK1 input A
Figure 3.5.25
Port C(PC2,PC5)
92CM27-97
2005-04-20
TMP92CM27
Port C register
7
PC (0030H) bit Symbol Read/Write After reset
6
5
PC5
4
PC4
3
PC3
2
PC2 R/W
1
PC1
0
PC0
Data from external port(Output latch register is set to "1")
Port C Control register
7
PCCR (0032H) bit Symbol Read/Write After reset
6
5
PC5C 0
4
PC4C 0
3
PC3C W 0
2
PC2C 0
1
PC1C 0
0
PC0C 0
Refer to following table
Port C Function register PCFC (0033H)
7
bit Symbol Read/Write After reset Function
6
5
PC5F 0
4
PC4F 0
3
PC3F W 0
2
PC2F 0
1
PC1F 0
0
PC0F 0
Refer to following table
Port C Function register 2
7
bit Symbol PCFC2 (0031H) Read/Write After reset Function
6
5
4
PC4F2 W 0
3
PC3F2 W 0
2
1
PC1F2 W 0
0
PC0F2 W 0
Refer to following table
Refer to following table
Port C function setting



PC5
Input port Output port SCK1 input SCK1 output
PC4
Input port Output port SI1 input SCL1 I/O(O.D Dis)
PC3
Input port Output port SO1 output(O.D Dis) SDA1 I/O(O.D Dis)
PC2
Input port Output port SCK0 input SCK0 output
PC1
Input port Output port SI0 input SCL0 I/O(O.D Dis)
PC0
Input port Output port SO0 output(O.D Dis) SDA0 I/O(O.D Dis)
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
Reserved Reserved Reserved
SCL1 I/O(O.D Ena)
Reserved Reserved
SO1 output(O.D Ena) SDA1 I/O(O.D Ena)
Reserved Reserved Reserved
SCL0 I/O(O.D Ena)
Reserved Reserved
SO0 (O.D Ena) SDA0 I/O(O.D Ena)
Note 1) Read-modify-write is prohibited for PCCR, PCFC and PCFC2. Note 2) SDA0/1, SCL0/1, SI0/1 and SCK0/1 input are inputted into the serial bus interface 0 and 1 irrespective of a functional setup of a port. Note 3) PC0, PC1, PC3 and PC4 do not have a register for 3-state/open drain setup. Moreover, there is no open drain function at the time of an output port. Figure 3.5.26 Port C register
92CM27-98
2005-04-20
TMP92CM27
3.5.8
Port D(PD0 to PD5)
Port D is an 6-bit general-purpose I/O port.
PD4 can be set as an open drain output. There are the following functions in addition to an I/O port. The I/O function of the serial cannel 2(RXD2, TXD2, SCLK2/ CTS2 ) The I/O function of the high speed channel 0(HSSI0, HSSO0, HSCLK0) These functions operate by setting the bit concerned of PDCR, PDFC and PDFC2 register. All the bits of PDCR, PDFC and PDFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write S Output latch PD write SB Selector PD read A PD0 (HSSI0) PD3 (RXD2)
HSSI0 RXD2
Figure 3.5.27 Port D(PD0,PD3)
92CM27-99
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write S Output latch PD write
HSSO HSCLK
A
S PD1(HSSO0) PD2(HSCLK0)
Selector B S B
PD read
Selector A
Figure 3.5.28 Port D(PD1,PD2)
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write Function control (on bit basis) PDFC2 write
Open drain setup is possible. Open drain control
S Output latch PD write
TXD2
A
S
(=1) PD4 (TXD2)
Selector B S B
PD read
Selector A
Figure 3.5.29 Port D(PD4)
92CM27-100
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PDCR write Function control (on bit basis) PDFC write S Output latch PD write A S PD5(SCLK 2 / CTS2)
Internal data bus
Selector B
SCLK2 output
SB Selector
PD read SCLK2 CTS2 input
A
Figure 3.5.30 Port D(PD5)
92CM27-101
2005-04-20
TMP92CM27
Port D register
7
PD (0034H) bit Symbol Read/Write After reset
6
5
PD5
4
PD4
3
PD3
2
PD2 R/W
1
PD1
0
PD0
Data from external port(Output latch register is set to "1")
Port D Control register
7
PDCR (0036H) bit Symbol Read/Write After reset
6
5
PD5C 0
4
PD4C 0
3
PD3C W 0
2
PD2C 0
1
PD1C 0
0
PD0C 0
Refer to following table
Port D Function register PDFC (0037H)
7
bit Symbol Read/Write After reset Function
6
5
PD5F 0
4
PD4F 0
3
PD3F W 0
2
PD2F 0
1
PD1F 0
0
PD0F 0
Refer to following table
Port D Function register 2
7
bit Symbol PDFC2 (0035H) Read/Write After reset Function
6
5
4
PD4F2 W 0
Refer to following table
3
2
1
0
Port D function setting



PD5
Input port Output port
SCLK2/ CTS2
PD4
Input port Output port Reserved TXD2(O.D Dis) Reserved Reserved Reserved TXD2(O.D Ena)
PD3
Input port Output port RXD2 Reserved
PD2
Input port Output port Reserved HSCLK0
PD1
Input port Output port Reserved HSSO0
PD0
Input port Output port HSSI0 Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
SCLK2 output
Note 1) Read-modify-write is prohibited for PDCR, PDFC and PDFC2. Note 2) RXD2, SCLK2 and CTS2 input are inputted into the serial bus interface 0 irrespective of a functional setup of a port. Note 3) HSSI0 input are inputted into the high speed serial channel 0 irrespective of a functional setup of a port. Note 4) PD4 do not have a register for 3-state/open drain setup. Moreover, there is no open drain function at the time of an output port. Figure 3.5.31 Port D register
92CM27-102
2005-04-20
TMP92CM27
3.5.9
Port F (PF0 to PF6)
Port F is an 7-bit general-purpose I/O port.
There are the following functions in addition to an I/O port. The input function of 8-bit timer 0(TA0IN) The output function of 8-bit timer 1(TA1OUT) The input function of 8-bit timer 2(TA2IN) The output function of 8-bit timer 3(TA3OUT) The input function of 8-bit timer 4(TA4IN) The output function of 8-bit timer 5(TA5OUT) The input function of 8-bit timer 6(TA6IN) The input function of external interrupt(INT0 to INT3) These functions operate by setting the bit concerned of PFCR, PFFC and PFFC2 register. All the bits of PFCR, PFFC and PFFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset
Direction control (on bit basis) PFCR write Function control (on bit basis) Internal data bus PFFC write Function control (on bit basis) PFFC2 write PF0(TA0IN/INT0) PF2(TA2IN/INT1) PF4(TA4IN/INT2) PF6(TA6IN/INT3) S B
S Output latch PF write Selector A PF read INT0 INT1 INT2 INT3
Select level/edge & Select rising/falling
TA0IN TA2IN TA4IN TA6IN
IIMC2 IIMC3
Figure 3.5.32 Port F(PF0,PF2,PF4,PF6)
92CM27-103
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PFCR write Internal data bus Function control (on bit basis) PFFC write S Output latch PF write
TA1OUT TA3OUT TA5OUT
A
S PF1(TA1OUT) PF3(TA3OUT) PF5(TA5OUT)
Selector B S B
PF read
Selector A
Figure 3.5.33 Port F(PF1,PF3,PF5)
92CM27-104
2005-04-20
TMP92CM27
Port F register
7
PF (003CH) bit Symbol Read/Write After reset
6
PF6
5
PF5
4
PF4
3
PF3 R/W
2
PF2
1
PF1
0
PF0
Data from external port(Output latch register is set to "1") Port F Control register
7
PFCR (003EH) bit Symbol Read/Write After reset
6
PF6C 0
5
PF5C 0
4
PF4C 0
3
PF3C W 0
2
PF2C 0
1
PF1C 0
0
PF0C 0
Refer to following table Port F Function register
7
PFFC (003FH) bit Symbol Read/Write After reset Function
6
PF6F 0
5
PF5F 0
4
PF4F 0
3
PF3F W 0
2
PF2F 0
1
PF1F 0
0
PF0F 0
Refer to following table Port F Function register 2
7
PFFC2 (003DH) bit Symbol Read/Write After reset Function
6
PF6F2 W 0
Refer to following table
5
4
PF4F2 W 0
Refer to following table
3
2
PF2F2 W 0
Refer to following table
1
0
PF0F2 W 0
Refer to following table
Port F function setting



PF6
Input port Output port TA6IN Reserved Reserved Reserved INT3 Reserved
PF5
Input port Output port Reserved TA5OUT
PF4
Input port Output port TA4IN Reserved Reserved Reserved INT2 Reserved
PF3
Input port Output port Reserved TA3OUT
PF2
Input port Output port TA2IN Reserved Reserved Reserved INT1 Reserved
PF1
Input port Output port Reserved TA1OUT
PF0
Input port Output port TA0IN Reserved Reserved Reserved INT0 Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
Note 1) Read-modify-write is prohibited for PFCR,PFFC and PFFC2. Note 2) TA0IN, TA2IN, TA4IN and TA6IN input is inputted into the 8-bit timer TMRA0 to TMRA6 irrespective of a functional setup of a port. Figure 3.5.34 Port F register
92CM27-105
2005-04-20
TMP92CM27
3.5.10 Port J (PJ0 to PJ7)
Port J is an 8-bit general-purpose I/O port. There are the following functions in addition to an I/O port. The output function of 16-bit timer 0(TB0OUT0, TB0OUT1) The output function of 16-bit timer 1(TB1OUT0, TB1OUT1) The output function of 16-bit timer 2(TB2OUT0, TB2OUT1) The output function of 16-bit timer 3(TB3OUT0, TB3OUT1) The output function of 16-bit timer 4(TB4OUT0, TB4OUT1) The output function of 16-bit timer 5(TB5OUT0, TB5OUT1) These functions operate by setting the bit concerned of PJCR, PJFC and PJFC2 register. All the bits of PJCR, PJFC and PJFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PJCR write
Internal data bus
Function control (on bit basis) PJFC write S Output latch PJ write
TB0OUT0 TB0OUT1 TB1OUT0 TB1OUT1
A
S PJ0(TB0OUT0) PJ1(TB0OUT1) PJ2(TB1OUT0) PJ3(TB1OUT1)
Selector B S B
PJ read
Selector A
Figure 3.5.35 Port J(PJ0,PJ1,PJ2,PJ3)
92CM27-106
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PJCR write Function control (on bit basis) PJFC write Function control (on bit basis) PJFC2 write S Output latch PJ write
TB2OUT0 TB2OUT1 TB3OUT0 TB3OUT1 TB4OUT0 TB4OUT1 TB5OUT0 TB5OUT1
Internal data bus
A
S
Selector B S
A
Selector B S B
PJ4 (TB2OUT0/ TB4OUT0) PJ5 (TB2OUT1/ TB4OUT1) PJ6 (TB3OUT0/ TB5OUT0) PJ7 (TB3OUT1/ TB5OUT1)
PJ read
Selector A
Figure 3.5.36 Port J(PJ4,PJ5,PJ6,PJ7)
92CM27-107
2005-04-20
TMP92CM27
Port J register
7
PJ (004CH) bit Symbol Read/Write After reset
6
PJ6
5
PJ5
4
PJ4 R/W
3
PJ3
2
PJ2
1
PJ1
0
PJ0
PJ7
Data from external port(Output latch register is set to "1") Port J Control register
7
PJCR (004EH) bit Symbol Read/Write After reset
6
PJ6C
5
PJ5C
4
PJ4C W 0
3
PJ3C
2
PJ2C
1
PJ1C
0
PJ0C
PJ7C
Refer to following table Port J Function register
7
PJFC (004FH) bit Symbol Read/Write After reset Function
6
PJ6F 0
5
PJ5F 0
4
PJ4F W 0
3
PJ3F 0
2
PJ2F 0
1
PJ1F 0
0
PJ0F 0
PJ7F 0
Refer to following table Port J Function register 2
7
PJFC2 (004DH) bit Symbol Read/Write After reset Function
6
PJ6F2 W 0
5
PJ5F2 0
4
PJ4F2 0
3
2
1
0
PJ7F2 0
Refer to following table
Port J function setting



PJ7
Input port Output port Reserved TB3OUT1 Reserved Reserved Reserved TB5OUT1
PJ6
Input port Output port Reserved TB3OUT0 Reserved Reserved Reserved TB5OUT0
PJ5
Input port Output port Reserved TB2OUT1 Reserved Reserved Reserved TB4OUT1
PJ4
Input port Output port Reserved TB2OUT0 Reserved Reserved Reserved TB4OUT0
PJ3
Input port Output port Reserved TB1OUT1
PJ2
Input port Output port Reserved TB1OUT0
PJ1
Input port Output port Reserved TB0OUT1
PJ0
Input port Output port Reserved TB0OUT0
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
Note ) Read-modify-write is prohibited for PJCR,PJFC and PJFC2. Figure 3.5.37 Port J register
92CM27-108
2005-04-20
TMP92CM27
3.5.11 Port K (PK0 to PK7)
Port K are a port only for inputs. There are the following functions in addition to an input port. The input function of 16-bit timer 0(TB0IN0, TB0IN1) The input function of 16-bit timer 1(TB1IN0, TB1IN1) The input function of 16-bit timer 2(TB2IN0, TB2IN1) The input function of 16-bit timer 3(TB3IN0, TB3IN1) The input function of external interrupt(INT4 to INTB) These functions operate by setting the bit concerned of PKFC and PKFC2 register. All the bits of PKFC and PKFC2 are cleared to "0" by the reset action, and all bits serve as an input port.
Reset
Function control (on bit basis) Internal data bus PKFC write Function control (on bit basis) PKFC2 write PK0(TB0IN0/INT4) PK1(TB0IN1/INT5) PK2(TB1IN0/INT6) PK3(TB1IN1/INT7) PK4(TB2IN0/INT8) PK5(TB2IN1/INT9) PK6(TB3IN0/INTA) PK7(TB3IN1/INTB)
PK read INT4 INT5 INT6 INT7 INT8 INT9 INTA INTB TB0IN0 TB0IN1 TB1IN0 TB1IN1 TB2IN0 TB2IN1 TB3IN0 TB3IN1
Select level/edge & Select rising/falling
IIMC2 IIMC3
Figure 3.5.38 Port K(PK0 to PK7)
92CM27-109
2005-04-20
TMP92CM27
Port K register
7
PK (0050H) bit Symbol Read/Write After reset
6
PK6
5
PK5
4
PK4 R
3
PK3
2
PK2
1
PK1
0
PK0
PK7
Data from external port Port K Function register
7
PKFC (0053H) bit Symbol Read/Write After reset Function
6
PK6F 0
5
PK5F 0
4
PK4F W 0
3
PK3F 0
2
PK2F 0
1
PK1F 0
0
PK0F 0
PK7F 0
Refer to following table Port K Function register 2
7
PKFC2 (0051H) bit Symbol Read/Write After reset Function
6
PK6F 0
5
PK5F 0
4
PK4F W 0
3
PK3F 0
2
PK2F 0
1
PK1F 0
0
PK0F 0
PK7F 0
Refer to following table
Port K function setting


PK7
Input port TB3IN1 Reserved INTB
PK6
Input port TB3IN0 Reserved INTA
PK5
Input port TB2IN1 Reserved INT9
PK4
Input port TB2IN0 Reserved INT8
PK3
Input port TB1IN1 Reserved INT7
PK2
Input port TB1IN0 Reserved INT6
PK1
Input port TB0IN1 Reserved INT5
PK0
Input port TB0IN0 Reserved INT4
0 0 1 1
0 1 0 1
Note 1) Read-modify-write is prohibited for PKFC and PKFC2. Note 2) TB0IN0/1, TB1IN0/1, TB2IN0/1 and TB3IN0/1 input is inputted into the 8-bit timer TMRB0 to
TMRB3 irrespective of a functional setup of a port.
Note 3) In setting (TB0IN0 to TB3IN1) of setting (INT4 to INTB) of =1 and =1 and =0 and =1, the operation of the HALT release is different. Refer to Table 3.3.6 HALT release source of 3.3.6 standby control part and the operation of the HALT release for details. Figure 3.5.39 Port K register
92CM27-110
2005-04-20
TMP92CM27
3.5.12 Port L (PL0 to PL7)
Port L is an 8-bit general-purpose I/O port. PL1 can be set as an open drain output. There are the following functions in addition to an I/O port. The output function of pattern generator 0(PG00 to PG03) The output function of pattern generator 1(PG10 to PG13) The I/O function of the serial cannel 3(RXD3, TXD3, SCLK3/ CTS3 ) The output function of 8-bit timer 7(TA7OUT) The I/O function of the high speed channel 1(HSSI1, HSSO1, HSCLK1) These functions operate by setting the bit concerned of PLCR, PLFC and PLFC2 register. All the bits of PLCR, PLFC and PLFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Outptu latch PL write PG00 PG10 A S PL0 (PG00/RXD3) PL4 (PG10/HSSI1) Selector B SB Selector PL read A
RXD3 HSSI1
Figure 3.5.40 Port L(PL0,PL4)
92CM27-111
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG01 TXD3 Open drain possible
A
S
,=11
Selector B A S
PL1 (PG01/TXD3)
Selector B S PL read B
Selector A
Figure 3.5.41 Port L(PL1)
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG02 SCLK3
A
S PL2 (PG02 / SCLK 3 / CTS3)
Selector B A S
Selector B S PL read B
Selector A
SCLK3
CTS3
input
Figure 3.5.42 Port L(PL2)
92CM27-112
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG03 TA7OUT
A
S PL3 (PG03/TA7OUT)
Selector B A S
Selector B S PL read B
Selector A
Figure 3.5.43 Port L(PL3)
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG11 PG12 HSSO1 HSCLK1
A
S PL5 (PG11/HSSO1) PL6 (PG12/HSCLK1)
Selector B A S
Selector B S PL read B
Selector A
Figure 3.5.44 Port L(PL5,PL6)
92CM27-113
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write S Output latch PL write
PG13
A
S PL7(PG13)
Selector B S B
PL read
Selector A
Figure 3.5.45 Port L(PL7)
92CM27-114
2005-04-20
TMP92CM27
Port L register
7
PL (0054H) bit Symbol Read/Write After reset
6
PL6
5
PL5
4
PL4
3
PL3 R/W
2
PL2
1
PL1
0
PL0
PL7
Data from external port(Output latch register is set to "1")
Port L Control register
7
PLCR (0056H) bit Symbol Read/Write After reset
6
PL6C 0
5
PL5C 0
4
PL4C 0
3
PL3C W 0
2
PL2C 0
1
PL1C 0
0
PL0C 0
PL7C 0
Refer to following table
Port L Function register
7
PLFC (0057H) bit Symbol Read/Write After reset Function
6
PL6F 0
5
PL5F 0
4
PL4F 0
3
PL3F W 0
2
PL2F 0
1
PL1F 0
0
PL0F 0
PL7F 0
Refer to following table
Port L Function register 2
7
PLFC2 (0055H) bit Symbol Read/Write After reset Function
6
PL6F2 0
5
PL5F2 0
4
PL4F2 0
3
PL3F2 W 0
2
PL2F2 0
1
PL1F2 0
0
PL0F2 0
Refer to following table
Port L function setting



PL7
Input port Output port Reserved PG13
PL6
Input port Output port Reserved PG12 Reserved HSCLK1 Reserved Reserved
PL5
Input port Output port Reserved PG11 Reserved HSSO1 Reserved Reserved
PL4
Input port Output port Reserved PG10 HSSI1 Reserved Reserved Reserved
PL3
Input port Output port Reserved PG03 Reserved Reserved Reserved TA7OUT
PL2
Input port Output port Reserved PG02
SCLK3/ CTS3
PL1
Input port Output port Reserved PG01 Reserved
TXD3 (O.D Dis)
PL0
Input port Output port Reserved PG00 RXD3 Reserved Reserved Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
SCLK3 Reserved Reserved
Reserved TXD3 (O.D Ena)
Note 1) Read-modify-write is prohibited for PLCR, PLFC and PLFC2. Note 2) RXD3, SCLK3 and CTS3 input are inputted into the serial bus interface 3 irrespective of a functional setup of a port. Note 3) HSSI1 input are inputted into the high speed serial channel 0 irrespective of a functional setup of a port. Note 4) PL1 does not have a register for 3-state/open drain setup. Moreover, there is no open drain function at the time of an output port. Figure 3.5.46 Port L register
92CM27-115
2005-04-20
TMP92CM27
3.5.8
Port D(PD0 to PD5)
Port D is an 6-bit general-purpose I/O port.
PD4 can be set as an open drain output. There are the following functions in addition to an I/O port. The I/O function of the serial cannel 2(RXD2, TXD2, SCLK2/ CTS2 ) The I/O function of the high speed channel 0(HSSI0, HSSO0, HSCLK0) These functions operate by setting the bit concerned of PDCR, PDFC and PDFC2 register. All the bits of PDCR, PDFC and PDFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write S Output latch PD write SB Selector PD read A PD0 (HSSI0) PD3 (RXD2)
HSSI0 RXD2
Figure 3.5.27 Port D(PD0,PD3)
92CM27-99
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write S Output latch PD write
HSSO HSCLK
A
S PD1(HSSO0) PD2(HSCLK0)
Selector B S B
PD read
Selector A
Figure 3.5.28 Port D(PD1,PD2)
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write Function control (on bit basis) PDFC2 write
Open drain setup is possible. Open drain control
S Output latch PD write
TXD2
A
S
(=1) PD4 (TXD2)
Selector B S B
PD read
Selector A
Figure 3.5.29 Port D(PD4)
92CM27-100
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PDCR write Function control (on bit basis) PDFC write S Output latch PD write A S PD5(SCLK 2 / CTS2)
Internal data bus
Selector B
SCLK2 output
SB Selector
PD read SCLK2 CTS2 input
A
Figure 3.5.30 Port D(PD5)
92CM27-101
2005-04-20
TMP92CM27
Port D register
7
PD (0034H) bit Symbol Read/Write After reset
6
5
PD5
4
PD4
3
PD3
2
PD2 R/W
1
PD1
0
PD0
Data from external port(Output latch register is set to "1")
Port D Control register
7
PDCR (0036H) bit Symbol Read/Write After reset
6
5
PD5C 0
4
PD4C 0
3
PD3C W 0
2
PD2C 0
1
PD1C 0
0
PD0C 0
Refer to following table
Port D Function register PDFC (0037H)
7
bit Symbol Read/Write After reset Function
6
5
PD5F 0
4
PD4F 0
3
PD3F W 0
2
PD2F 0
1
PD1F 0
0
PD0F 0
Refer to following table
Port D Function register 2
7
bit Symbol PDFC2 (0035H) Read/Write After reset Function
6
5
4
PD4F2 W 0
Refer to following table
3
2
1
0
Port D function setting



PD5
Input port Output port
SCLK2/ CTS2
PD4
Input port Output port Reserved TXD2(O.D Dis) Reserved Reserved Reserved TXD2(O.D Ena)
PD3
Input port Output port RXD2 Reserved
PD2
Input port Output port Reserved HSCLK0
PD1
Input port Output port Reserved HSSO0
PD0
Input port Output port HSSI0 Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
SCLK2 output
Note 1) Read-modify-write is prohibited for PDCR, PDFC and PDFC2. Note 2) RXD2, SCLK2 and CTS2 input are inputted into the serial bus interface 0 irrespective of a functional setup of a port. Note 3) HSSI0 input are inputted into the high speed serial channel 0 irrespective of a functional setup of a port. Note 4) PD4 do not have a register for 3-state/open drain setup. Moreover, there is no open drain function at the time of an output port. Figure 3.5.31 Port D register
92CM27-102
2005-04-20
TMP92CM27
3.5.9
Port F (PF0 to PF6)
Port F is an 7-bit general-purpose I/O port.
There are the following functions in addition to an I/O port. The input function of 8-bit timer 0(TA0IN) The output function of 8-bit timer 1(TA1OUT) The input function of 8-bit timer 2(TA2IN) The output function of 8-bit timer 3(TA3OUT) The input function of 8-bit timer 4(TA4IN) The output function of 8-bit timer 5(TA5OUT) The input function of 8-bit timer 6(TA6IN) The input function of external interrupt(INT0 to INT3) These functions operate by setting the bit concerned of PFCR, PFFC and PFFC2 register. All the bits of PFCR, PFFC and PFFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset
Direction control (on bit basis) PFCR write Function control (on bit basis) Internal data bus PFFC write Function control (on bit basis) PFFC2 write PF0(TA0IN/INT0) PF2(TA2IN/INT1) PF4(TA4IN/INT2) PF6(TA6IN/INT3) S B
S Output latch PF write Selector A PF read INT0 INT1 INT2 INT3
Select level/edge & Select rising/falling
TA0IN TA2IN TA4IN TA6IN
IIMC2 IIMC3
Figure 3.5.32 Port F(PF0,PF2,PF4,PF6)
92CM27-103
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PFCR write Internal data bus Function control (on bit basis) PFFC write S Output latch PF write
TA1OUT TA3OUT TA5OUT
A
S PF1(TA1OUT) PF3(TA3OUT) PF5(TA5OUT)
Selector B S B
PF read
Selector A
Figure 3.5.33 Port F(PF1,PF3,PF5)
92CM27-104
2005-04-20
TMP92CM27
Port F register
7
PF (003CH) bit Symbol Read/Write After reset
6
PF6
5
PF5
4
PF4
3
PF3 R/W
2
PF2
1
PF1
0
PF0
Data from external port(Output latch register is set to "1") Port F Control register
7
PFCR (003EH) bit Symbol Read/Write After reset
6
PF6C 0
5
PF5C 0
4
PF4C 0
3
PF3C W 0
2
PF2C 0
1
PF1C 0
0
PF0C 0
Refer to following table Port F Function register
7
PFFC (003FH) bit Symbol Read/Write After reset Function
6
PF6F 0
5
PF5F 0
4
PF4F 0
3
PF3F W 0
2
PF2F 0
1
PF1F 0
0
PF0F 0
Refer to following table Port F Function register 2
7
PFFC2 (003DH) bit Symbol Read/Write After reset Function
6
PF6F2 W 0
Refer to following table
5
4
PF4F2 W 0
Refer to following table
3
2
PF2F2 W 0
Refer to following table
1
0
PF0F2 W 0
Refer to following table
Port F function setting



PF6
Input port Output port TA6IN Reserved Reserved Reserved INT3 Reserved
PF5
Input port Output port Reserved TA5OUT
PF4
Input port Output port TA4IN Reserved Reserved Reserved INT2 Reserved
PF3
Input port Output port Reserved TA3OUT
PF2
Input port Output port TA2IN Reserved Reserved Reserved INT1 Reserved
PF1
Input port Output port Reserved TA1OUT
PF0
Input port Output port TA0IN Reserved Reserved Reserved INT0 Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
Note 1) Read-modify-write is prohibited for PFCR,PFFC and PFFC2. Note 2) TA0IN, TA2IN, TA4IN and TA6IN input is inputted into the 8-bit timer TMRA0 to TMRA6 irrespective of a functional setup of a port. Figure 3.5.34 Port F register
92CM27-105
2005-04-20
TMP92CM27
3.5.10 Port J (PJ0 to PJ7)
Port J is an 8-bit general-purpose I/O port. There are the following functions in addition to an I/O port. The output function of 16-bit timer 0(TB0OUT0, TB0OUT1) The output function of 16-bit timer 1(TB1OUT0, TB1OUT1) The output function of 16-bit timer 2(TB2OUT0, TB2OUT1) The output function of 16-bit timer 3(TB3OUT0, TB3OUT1) The output function of 16-bit timer 4(TB4OUT0, TB4OUT1) The output function of 16-bit timer 5(TB5OUT0, TB5OUT1) These functions operate by setting the bit concerned of PJCR, PJFC and PJFC2 register. All the bits of PJCR, PJFC and PJFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PJCR write
Internal data bus
Function control (on bit basis) PJFC write S Output latch PJ write
TB0OUT0 TB0OUT1 TB1OUT0 TB1OUT1
A
S PJ0(TB0OUT0) PJ1(TB0OUT1) PJ2(TB1OUT0) PJ3(TB1OUT1)
Selector B S B
PJ read
Selector A
Figure 3.5.35 Port J(PJ0,PJ1,PJ2,PJ3)
92CM27-106
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PJCR write Function control (on bit basis) PJFC write Function control (on bit basis) PJFC2 write S Output latch PJ write
TB2OUT0 TB2OUT1 TB3OUT0 TB3OUT1 TB4OUT0 TB4OUT1 TB5OUT0 TB5OUT1
Internal data bus
A
S
Selector B S
A
Selector B S B
PJ4 (TB2OUT0/ TB4OUT0) PJ5 (TB2OUT1/ TB4OUT1) PJ6 (TB3OUT0/ TB5OUT0) PJ7 (TB3OUT1/ TB5OUT1)
PJ read
Selector A
Figure 3.5.36 Port J(PJ4,PJ5,PJ6,PJ7)
92CM27-107
2005-04-20
TMP92CM27
Port J register
7
PJ (004CH) bit Symbol Read/Write After reset
6
PJ6
5
PJ5
4
PJ4 R/W
3
PJ3
2
PJ2
1
PJ1
0
PJ0
PJ7
Data from external port(Output latch register is set to "1") Port J Control register
7
PJCR (004EH) bit Symbol Read/Write After reset
6
PJ6C
5
PJ5C
4
PJ4C W 0
3
PJ3C
2
PJ2C
1
PJ1C
0
PJ0C
PJ7C
Refer to following table Port J Function register
7
PJFC (004FH) bit Symbol Read/Write After reset Function
6
PJ6F 0
5
PJ5F 0
4
PJ4F W 0
3
PJ3F 0
2
PJ2F 0
1
PJ1F 0
0
PJ0F 0
PJ7F 0
Refer to following table Port J Function register 2
7
PJFC2 (004DH) bit Symbol Read/Write After reset Function
6
PJ6F2 W 0
5
PJ5F2 0
4
PJ4F2 0
3
2
1
0
PJ7F2 0
Refer to following table
Port J function setting



PJ7
Input port Output port Reserved TB3OUT1 Reserved Reserved Reserved TB5OUT1
PJ6
Input port Output port Reserved TB3OUT0 Reserved Reserved Reserved TB5OUT0
PJ5
Input port Output port Reserved TB2OUT1 Reserved Reserved Reserved TB4OUT1
PJ4
Input port Output port Reserved TB2OUT0 Reserved Reserved Reserved TB4OUT0
PJ3
Input port Output port Reserved TB1OUT1
PJ2
Input port Output port Reserved TB1OUT0
PJ1
Input port Output port Reserved TB0OUT1
PJ0
Input port Output port Reserved TB0OUT0
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
Note ) Read-modify-write is prohibited for PJCR,PJFC and PJFC2. Figure 3.5.37 Port J register
92CM27-108
2005-04-20
TMP92CM27
3.5.11 Port K (PK0 to PK7)
Port K are a port only for inputs. There are the following functions in addition to an input port. The input function of 16-bit timer 0(TB0IN0, TB0IN1) The input function of 16-bit timer 1(TB1IN0, TB1IN1) The input function of 16-bit timer 2(TB2IN0, TB2IN1) The input function of 16-bit timer 3(TB3IN0, TB3IN1) The input function of external interrupt(INT4 to INTB) These functions operate by setting the bit concerned of PKFC and PKFC2 register. All the bits of PKFC and PKFC2 are cleared to "0" by the reset action, and all bits serve as an input port.
Reset
Function control (on bit basis) Internal data bus PKFC write Function control (on bit basis) PKFC2 write PK0(TB0IN0/INT4) PK1(TB0IN1/INT5) PK2(TB1IN0/INT6) PK3(TB1IN1/INT7) PK4(TB2IN0/INT8) PK5(TB2IN1/INT9) PK6(TB3IN0/INTA) PK7(TB3IN1/INTB)
PK read INT4 INT5 INT6 INT7 INT8 INT9 INTA INTB TB0IN0 TB0IN1 TB1IN0 TB1IN1 TB2IN0 TB2IN1 TB3IN0 TB3IN1
Select level/edge & Select rising/falling
IIMC2 IIMC3
Figure 3.5.38 Port K(PK0 to PK7)
92CM27-109
2005-04-20
TMP92CM27
Port K register
7
PK (0050H) bit Symbol Read/Write After reset
6
PK6
5
PK5
4
PK4 R
3
PK3
2
PK2
1
PK1
0
PK0
PK7
Data from external port Port K Function register
7
PKFC (0053H) bit Symbol Read/Write After reset Function
6
PK6F 0
5
PK5F 0
4
PK4F W 0
3
PK3F 0
2
PK2F 0
1
PK1F 0
0
PK0F 0
PK7F 0
Refer to following table Port K Function register 2
7
PKFC2 (0051H) bit Symbol Read/Write After reset Function
6
PK6F 0
5
PK5F 0
4
PK4F W 0
3
PK3F 0
2
PK2F 0
1
PK1F 0
0
PK0F 0
PK7F 0
Refer to following table
Port K function setting


PK7
Input port TB3IN1 Reserved INTB
PK6
Input port TB3IN0 Reserved INTA
PK5
Input port TB2IN1 Reserved INT9
PK4
Input port TB2IN0 Reserved INT8
PK3
Input port TB1IN1 Reserved INT7
PK2
Input port TB1IN0 Reserved INT6
PK1
Input port TB0IN1 Reserved INT5
PK0
Input port TB0IN0 Reserved INT4
0 0 1 1
0 1 0 1
Note 1) Read-modify-write is prohibited for PKFC and PKFC2. Note 2) TB0IN0/1, TB1IN0/1, TB2IN0/1 and TB3IN0/1 input is inputted into the 8-bit timer TMRB0 to
TMRB3 irrespective of a functional setup of a port.
Note 3) In setting (TB0IN0 to TB3IN1) of setting (INT4 to INTB) of =1 and =1 and =0 and =1, the operation of the HALT release is different. Refer to Table 3.3.6 HALT release source of 3.3.6 standby control part and the operation of the HALT release for details. Figure 3.5.39 Port K register
92CM27-110
2005-04-20
TMP92CM27
3.5.12 Port L (PL0 to PL7)
Port L is an 8-bit general-purpose I/O port. PL1 can be set as an open drain output. There are the following functions in addition to an I/O port. The output function of pattern generator 0(PG00 to PG03) The output function of pattern generator 1(PG10 to PG13) The I/O function of the serial cannel 3(RXD3, TXD3, SCLK3/ CTS3 ) The output function of 8-bit timer 7(TA7OUT) The I/O function of the high speed channel 1(HSSI1, HSSO1, HSCLK1) These functions operate by setting the bit concerned of PLCR, PLFC and PLFC2 register. All the bits of PLCR, PLFC and PLFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Outptu latch PL write PG00 PG10 A S PL0 (PG00/RXD3) PL4 (PG10/HSSI1) Selector B SB Selector PL read A
RXD3 HSSI1
Figure 3.5.40 Port L(PL0,PL4)
92CM27-111
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG01 TXD3 Open drain possible
A
S
,=11
Selector B A S
PL1 (PG01/TXD3)
Selector B S PL read B
Selector A
Figure 3.5.41 Port L(PL1)
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG02 SCLK3
A
S PL2 (PG02 / SCLK 3 / CTS3)
Selector B A S
Selector B S PL read B
Selector A
SCLK3
CTS3
input
Figure 3.5.42 Port L(PL2)
92CM27-112
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG03 TA7OUT
A
S PL3 (PG03/TA7OUT)
Selector B A S
Selector B S PL read B
Selector A
Figure 3.5.43 Port L(PL3)
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG11 PG12 HSSO1 HSCLK1
A
S PL5 (PG11/HSSO1) PL6 (PG12/HSCLK1)
Selector B A S
Selector B S PL read B
Selector A
Figure 3.5.44 Port L(PL5,PL6)
92CM27-113
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write S Output latch PL write
PG13
A
S PL7(PG13)
Selector B S B
PL read
Selector A
Figure 3.5.45 Port L(PL7)
92CM27-114
2005-04-20
TMP92CM27
Port L register
7
PL (0054H) bit Symbol Read/Write After reset
6
PL6
5
PL5
4
PL4
3
PL3 R/W
2
PL2
1
PL1
0
PL0
PL7
Data from external port(Output latch register is set to "1")
Port L Control register
7
PLCR (0056H) bit Symbol Read/Write After reset
6
PL6C 0
5
PL5C 0
4
PL4C 0
3
PL3C W 0
2
PL2C 0
1
PL1C 0
0
PL0C 0
PL7C 0
Refer to following table
Port L Function register
7
PLFC (0057H) bit Symbol Read/Write After reset Function
6
PL6F 0
5
PL5F 0
4
PL4F 0
3
PL3F W 0
2
PL2F 0
1
PL1F 0
0
PL0F 0
PL7F 0
Refer to following table
Port L Function register 2
7
PLFC2 (0055H) bit Symbol Read/Write After reset Function
6
PL6F2 0
5
PL5F2 0
4
PL4F2 0
3
PL3F2 W 0
2
PL2F2 0
1
PL1F2 0
0
PL0F2 0
Refer to following table
Port L function setting



PL7
Input port Output port Reserved PG13
PL6
Input port Output port Reserved PG12 Reserved HSCLK1 Reserved Reserved
PL5
Input port Output port Reserved PG11 Reserved HSSO1 Reserved Reserved
PL4
Input port Output port Reserved PG10 HSSI1 Reserved Reserved Reserved
PL3
Input port Output port Reserved PG03 Reserved Reserved Reserved TA7OUT
PL2
Input port Output port Reserved PG02
SCLK3/ CTS3
PL1
Input port Output port Reserved PG01 Reserved
TXD3 (O.D Dis)
PL0
Input port Output port Reserved PG00 RXD3 Reserved Reserved Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
SCLK3 Reserved Reserved
Reserved TXD3 (O.D Ena)
Note 1) Read-modify-write is prohibited for PLCR, PLFC and PLFC2. Note 2) RXD3, SCLK3 and CTS3 input are inputted into the serial bus interface 3 irrespective of a functional setup of a port. Note 3) HSSI1 input are inputted into the high speed serial channel 0 irrespective of a functional setup of a port. Note 4) PL1 does not have a register for 3-state/open drain setup. Moreover, there is no open drain function at the time of an output port. Figure 3.5.46 Port L register
92CM27-115
2005-04-20
TMP92CM27
3.5.8
Port D(PD0 to PD5)
Port D is an 6-bit general-purpose I/O port.
PD4 can be set as an open drain output. There are the following functions in addition to an I/O port. The I/O function of the serial cannel 2(RXD2, TXD2, SCLK2/ CTS2 ) The I/O function of the high speed channel 0(HSSI0, HSSO0, HSCLK0) These functions operate by setting the bit concerned of PDCR, PDFC and PDFC2 register. All the bits of PDCR, PDFC and PDFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write S Output latch PD write SB Selector PD read A PD0 (HSSI0) PD3 (RXD2)
HSSI0 RXD2
Figure 3.5.27 Port D(PD0,PD3)
92CM27-99
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write S Output latch PD write
HSSO HSCLK
A
S PD1(HSSO0) PD2(HSCLK0)
Selector B S B
PD read
Selector A
Figure 3.5.28 Port D(PD1,PD2)
Reset Direction control (on bit basis) PDCR write Internal data bus Function control (on bit basis) PDFC write Function control (on bit basis) PDFC2 write
Open drain setup is possible. Open drain control
S Output latch PD write
TXD2
A
S
(=1) PD4 (TXD2)
Selector B S B
PD read
Selector A
Figure 3.5.29 Port D(PD4)
92CM27-100
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PDCR write Function control (on bit basis) PDFC write S Output latch PD write A S PD5(SCLK 2 / CTS2)
Internal data bus
Selector B
SCLK2 output
SB Selector
PD read SCLK2 CTS2 input
A
Figure 3.5.30 Port D(PD5)
92CM27-101
2005-04-20
TMP92CM27
Port D register
7
PD (0034H) bit Symbol Read/Write After reset
6
5
PD5
4
PD4
3
PD3
2
PD2 R/W
1
PD1
0
PD0
Data from external port(Output latch register is set to "1")
Port D Control register
7
PDCR (0036H) bit Symbol Read/Write After reset
6
5
PD5C 0
4
PD4C 0
3
PD3C W 0
2
PD2C 0
1
PD1C 0
0
PD0C 0
Refer to following table
Port D Function register PDFC (0037H)
7
bit Symbol Read/Write After reset Function
6
5
PD5F 0
4
PD4F 0
3
PD3F W 0
2
PD2F 0
1
PD1F 0
0
PD0F 0
Refer to following table
Port D Function register 2
7
bit Symbol PDFC2 (0035H) Read/Write After reset Function
6
5
4
PD4F2 W 0
Refer to following table
3
2
1
0
Port D function setting



PD5
Input port Output port
SCLK2/ CTS2
PD4
Input port Output port Reserved TXD2(O.D Dis) Reserved Reserved Reserved TXD2(O.D Ena)
PD3
Input port Output port RXD2 Reserved
PD2
Input port Output port Reserved HSCLK0
PD1
Input port Output port Reserved HSSO0
PD0
Input port Output port HSSI0 Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
SCLK2 output
Note 1) Read-modify-write is prohibited for PDCR, PDFC and PDFC2. Note 2) RXD2, SCLK2 and CTS2 input are inputted into the serial bus interface 0 irrespective of a functional setup of a port. Note 3) HSSI0 input are inputted into the high speed serial channel 0 irrespective of a functional setup of a port. Note 4) PD4 do not have a register for 3-state/open drain setup. Moreover, there is no open drain function at the time of an output port. Figure 3.5.31 Port D register
92CM27-102
2005-04-20
TMP92CM27
3.5.9
Port F (PF0 to PF6)
Port F is an 7-bit general-purpose I/O port.
There are the following functions in addition to an I/O port. The input function of 8-bit timer 0(TA0IN) The output function of 8-bit timer 1(TA1OUT) The input function of 8-bit timer 2(TA2IN) The output function of 8-bit timer 3(TA3OUT) The input function of 8-bit timer 4(TA4IN) The output function of 8-bit timer 5(TA5OUT) The input function of 8-bit timer 6(TA6IN) The input function of external interrupt(INT0 to INT3) These functions operate by setting the bit concerned of PFCR, PFFC and PFFC2 register. All the bits of PFCR, PFFC and PFFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset
Direction control (on bit basis) PFCR write Function control (on bit basis) Internal data bus PFFC write Function control (on bit basis) PFFC2 write PF0(TA0IN/INT0) PF2(TA2IN/INT1) PF4(TA4IN/INT2) PF6(TA6IN/INT3) S B
S Output latch PF write Selector A PF read INT0 INT1 INT2 INT3
Select level/edge & Select rising/falling
TA0IN TA2IN TA4IN TA6IN
IIMC2 IIMC3
Figure 3.5.32 Port F(PF0,PF2,PF4,PF6)
92CM27-103
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PFCR write Internal data bus Function control (on bit basis) PFFC write S Output latch PF write
TA1OUT TA3OUT TA5OUT
A
S PF1(TA1OUT) PF3(TA3OUT) PF5(TA5OUT)
Selector B S B
PF read
Selector A
Figure 3.5.33 Port F(PF1,PF3,PF5)
92CM27-104
2005-04-20
TMP92CM27
Port F register
7
PF (003CH) bit Symbol Read/Write After reset
6
PF6
5
PF5
4
PF4
3
PF3 R/W
2
PF2
1
PF1
0
PF0
Data from external port(Output latch register is set to "1") Port F Control register
7
PFCR (003EH) bit Symbol Read/Write After reset
6
PF6C 0
5
PF5C 0
4
PF4C 0
3
PF3C W 0
2
PF2C 0
1
PF1C 0
0
PF0C 0
Refer to following table Port F Function register
7
PFFC (003FH) bit Symbol Read/Write After reset Function
6
PF6F 0
5
PF5F 0
4
PF4F 0
3
PF3F W 0
2
PF2F 0
1
PF1F 0
0
PF0F 0
Refer to following table Port F Function register 2
7
PFFC2 (003DH) bit Symbol Read/Write After reset Function
6
PF6F2 W 0
Refer to following table
5
4
PF4F2 W 0
Refer to following table
3
2
PF2F2 W 0
Refer to following table
1
0
PF0F2 W 0
Refer to following table
Port F function setting



PF6
Input port Output port TA6IN Reserved Reserved Reserved INT3 Reserved
PF5
Input port Output port Reserved TA5OUT
PF4
Input port Output port TA4IN Reserved Reserved Reserved INT2 Reserved
PF3
Input port Output port Reserved TA3OUT
PF2
Input port Output port TA2IN Reserved Reserved Reserved INT1 Reserved
PF1
Input port Output port Reserved TA1OUT
PF0
Input port Output port TA0IN Reserved Reserved Reserved INT0 Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
Note 1) Read-modify-write is prohibited for PFCR,PFFC and PFFC2. Note 2) TA0IN, TA2IN, TA4IN and TA6IN input is inputted into the 8-bit timer TMRA0 to TMRA6 irrespective of a functional setup of a port. Figure 3.5.34 Port F register
92CM27-105
2005-04-20
TMP92CM27
3.5.10 Port J (PJ0 to PJ7)
Port J is an 8-bit general-purpose I/O port. There are the following functions in addition to an I/O port. The output function of 16-bit timer 0(TB0OUT0, TB0OUT1) The output function of 16-bit timer 1(TB1OUT0, TB1OUT1) The output function of 16-bit timer 2(TB2OUT0, TB2OUT1) The output function of 16-bit timer 3(TB3OUT0, TB3OUT1) The output function of 16-bit timer 4(TB4OUT0, TB4OUT1) The output function of 16-bit timer 5(TB5OUT0, TB5OUT1) These functions operate by setting the bit concerned of PJCR, PJFC and PJFC2 register. All the bits of PJCR, PJFC and PJFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PJCR write
Internal data bus
Function control (on bit basis) PJFC write S Output latch PJ write
TB0OUT0 TB0OUT1 TB1OUT0 TB1OUT1
A
S PJ0(TB0OUT0) PJ1(TB0OUT1) PJ2(TB1OUT0) PJ3(TB1OUT1)
Selector B S B
PJ read
Selector A
Figure 3.5.35 Port J(PJ0,PJ1,PJ2,PJ3)
92CM27-106
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PJCR write Function control (on bit basis) PJFC write Function control (on bit basis) PJFC2 write S Output latch PJ write
TB2OUT0 TB2OUT1 TB3OUT0 TB3OUT1 TB4OUT0 TB4OUT1 TB5OUT0 TB5OUT1
Internal data bus
A
S
Selector B S
A
Selector B S B
PJ4 (TB2OUT0/ TB4OUT0) PJ5 (TB2OUT1/ TB4OUT1) PJ6 (TB3OUT0/ TB5OUT0) PJ7 (TB3OUT1/ TB5OUT1)
PJ read
Selector A
Figure 3.5.36 Port J(PJ4,PJ5,PJ6,PJ7)
92CM27-107
2005-04-20
TMP92CM27
Port J register
7
PJ (004CH) bit Symbol Read/Write After reset
6
PJ6
5
PJ5
4
PJ4 R/W
3
PJ3
2
PJ2
1
PJ1
0
PJ0
PJ7
Data from external port(Output latch register is set to "1") Port J Control register
7
PJCR (004EH) bit Symbol Read/Write After reset
6
PJ6C
5
PJ5C
4
PJ4C W 0
3
PJ3C
2
PJ2C
1
PJ1C
0
PJ0C
PJ7C
Refer to following table Port J Function register
7
PJFC (004FH) bit Symbol Read/Write After reset Function
6
PJ6F 0
5
PJ5F 0
4
PJ4F W 0
3
PJ3F 0
2
PJ2F 0
1
PJ1F 0
0
PJ0F 0
PJ7F 0
Refer to following table Port J Function register 2
7
PJFC2 (004DH) bit Symbol Read/Write After reset Function
6
PJ6F2 W 0
5
PJ5F2 0
4
PJ4F2 0
3
2
1
0
PJ7F2 0
Refer to following table
Port J function setting



PJ7
Input port Output port Reserved TB3OUT1 Reserved Reserved Reserved TB5OUT1
PJ6
Input port Output port Reserved TB3OUT0 Reserved Reserved Reserved TB5OUT0
PJ5
Input port Output port Reserved TB2OUT1 Reserved Reserved Reserved TB4OUT1
PJ4
Input port Output port Reserved TB2OUT0 Reserved Reserved Reserved TB4OUT0
PJ3
Input port Output port Reserved TB1OUT1
PJ2
Input port Output port Reserved TB1OUT0
PJ1
Input port Output port Reserved TB0OUT1
PJ0
Input port Output port Reserved TB0OUT0
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
Note ) Read-modify-write is prohibited for PJCR,PJFC and PJFC2. Figure 3.5.37 Port J register
92CM27-108
2005-04-20
TMP92CM27
3.5.11 Port K (PK0 to PK7)
Port K are a port only for inputs. There are the following functions in addition to an input port. The input function of 16-bit timer 0(TB0IN0, TB0IN1) The input function of 16-bit timer 1(TB1IN0, TB1IN1) The input function of 16-bit timer 2(TB2IN0, TB2IN1) The input function of 16-bit timer 3(TB3IN0, TB3IN1) The input function of external interrupt(INT4 to INTB) These functions operate by setting the bit concerned of PKFC and PKFC2 register. All the bits of PKFC and PKFC2 are cleared to "0" by the reset action, and all bits serve as an input port.
Reset
Function control (on bit basis) Internal data bus PKFC write Function control (on bit basis) PKFC2 write PK0(TB0IN0/INT4) PK1(TB0IN1/INT5) PK2(TB1IN0/INT6) PK3(TB1IN1/INT7) PK4(TB2IN0/INT8) PK5(TB2IN1/INT9) PK6(TB3IN0/INTA) PK7(TB3IN1/INTB)
PK read INT4 INT5 INT6 INT7 INT8 INT9 INTA INTB TB0IN0 TB0IN1 TB1IN0 TB1IN1 TB2IN0 TB2IN1 TB3IN0 TB3IN1
Select level/edge & Select rising/falling
IIMC2 IIMC3
Figure 3.5.38 Port K(PK0 to PK7)
92CM27-109
2005-04-20
TMP92CM27
Port K register
7
PK (0050H) bit Symbol Read/Write After reset
6
PK6
5
PK5
4
PK4 R
3
PK3
2
PK2
1
PK1
0
PK0
PK7
Data from external port Port K Function register
7
PKFC (0053H) bit Symbol Read/Write After reset Function
6
PK6F 0
5
PK5F 0
4
PK4F W 0
3
PK3F 0
2
PK2F 0
1
PK1F 0
0
PK0F 0
PK7F 0
Refer to following table Port K Function register 2
7
PKFC2 (0051H) bit Symbol Read/Write After reset Function
6
PK6F 0
5
PK5F 0
4
PK4F W 0
3
PK3F 0
2
PK2F 0
1
PK1F 0
0
PK0F 0
PK7F 0
Refer to following table
Port K function setting


PK7
Input port TB3IN1 Reserved INTB
PK6
Input port TB3IN0 Reserved INTA
PK5
Input port TB2IN1 Reserved INT9
PK4
Input port TB2IN0 Reserved INT8
PK3
Input port TB1IN1 Reserved INT7
PK2
Input port TB1IN0 Reserved INT6
PK1
Input port TB0IN1 Reserved INT5
PK0
Input port TB0IN0 Reserved INT4
0 0 1 1
0 1 0 1
Note 1) Read-modify-write is prohibited for PKFC and PKFC2. Note 2) TB0IN0/1, TB1IN0/1, TB2IN0/1 and TB3IN0/1 input is inputted into the 8-bit timer TMRB0 to
TMRB3 irrespective of a functional setup of a port.
Note 3) In setting (TB0IN0 to TB3IN1) of setting (INT4 to INTB) of =1 and =1 and =0 and =1, the operation of the HALT release is different. Refer to Table 3.3.6 HALT release source of 3.3.6 standby control part and the operation of the HALT release for details. Figure 3.5.39 Port K register
92CM27-110
2005-04-20
TMP92CM27
3.5.12 Port L (PL0 to PL7)
Port L is an 8-bit general-purpose I/O port. PL1 can be set as an open drain output. There are the following functions in addition to an I/O port. The output function of pattern generator 0(PG00 to PG03) The output function of pattern generator 1(PG10 to PG13) The I/O function of the serial cannel 3(RXD3, TXD3, SCLK3/ CTS3 ) The output function of 8-bit timer 7(TA7OUT) The I/O function of the high speed channel 1(HSSI1, HSSO1, HSCLK1) These functions operate by setting the bit concerned of PLCR, PLFC and PLFC2 register. All the bits of PLCR, PLFC and PLFC2 are cleared to "0" by the reset action, and all bits serve as an input port. Moreover, the output latch of all bit is set to "1".
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Outptu latch PL write PG00 PG10 A S PL0 (PG00/RXD3) PL4 (PG10/HSSI1) Selector B SB Selector PL read A
RXD3 HSSI1
Figure 3.5.40 Port L(PL0,PL4)
92CM27-111
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG01 TXD3 Open drain possible
A
S
,=11
Selector B A S
PL1 (PG01/TXD3)
Selector B S PL read B
Selector A
Figure 3.5.41 Port L(PL1)
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG02 SCLK3
A
S PL2 (PG02 / SCLK 3 / CTS3)
Selector B A S
Selector B S PL read B
Selector A
SCLK3
CTS3
input
Figure 3.5.42 Port L(PL2)
92CM27-112
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG03 TA7OUT
A
S PL3 (PG03/TA7OUT)
Selector B A S
Selector B S PL read B
Selector A
Figure 3.5.43 Port L(PL3)
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write Function control (on bit basis) PLFC2 write S Output latch PL write
PG11 PG12 HSSO1 HSCLK1
A
S PL5 (PG11/HSSO1) PL6 (PG12/HSCLK1)
Selector B A S
Selector B S PL read B
Selector A
Figure 3.5.44 Port L(PL5,PL6)
92CM27-113
2005-04-20
TMP92CM27
Reset Direction control (on bit basis) PLCR write
Internal data bus
Function control (on bit basis) PLFC write S Output latch PL write
PG13
A
S PL7(PG13)
Selector B S B
PL read
Selector A
Figure 3.5.45 Port L(PL7)
92CM27-114
2005-04-20
TMP92CM27
Port L register
7
PL (0054H) bit Symbol Read/Write After reset
6
PL6
5
PL5
4
PL4
3
PL3 R/W
2
PL2
1
PL1
0
PL0
PL7
Data from external port(Output latch register is set to "1")
Port L Control register
7
PLCR (0056H) bit Symbol Read/Write After reset
6
PL6C 0
5
PL5C 0
4
PL4C 0
3
PL3C W 0
2
PL2C 0
1
PL1C 0
0
PL0C 0
PL7C 0
Refer to following table
Port L Function register
7
PLFC (0057H) bit Symbol Read/Write After reset Function
6
PL6F 0
5
PL5F 0
4
PL4F 0
3
PL3F W 0
2
PL2F 0
1
PL1F 0
0
PL0F 0
PL7F 0
Refer to following table
Port L Function register 2
7
PLFC2 (0055H) bit Symbol Read/Write After reset Function
6
PL6F2 0
5
PL5F2 0
4
PL4F2 0
3
PL3F2 W 0
2
PL2F2 0
1
PL1F2 0
0
PL0F2 0
Refer to following table
Port L function setting



PL7
Input port Output port Reserved PG13
PL6
Input port Output port Reserved PG12 Reserved HSCLK1 Reserved Reserved
PL5
Input port Output port Reserved PG11 Reserved HSSO1 Reserved Reserved
PL4
Input port Output port Reserved PG10 HSSI1 Reserved Reserved Reserved
PL3
Input port Output port Reserved PG03 Reserved Reserved Reserved TA7OUT
PL2
Input port Output port Reserved PG02
SCLK3/ CTS3
PL1
Input port Output port Reserved PG01 Reserved
TXD3 (O.D Dis)
PL0
Input port Output port Reserved PG00 RXD3 Reserved Reserved Reserved
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
SCLK3 Reserved Reserved
Reserved TXD3 (O.D Ena)
Note 1) Read-modify-write is prohibited for PLCR, PLFC and PLFC2. Note 2) RXD3, SCLK3 and CTS3 input are inputted into the serial bus interface 3 irrespective of a functional setup of a port. Note 3) HSSI1 input are inputted into the high speed serial channel 0 irrespective of a functional setup of a port. Note 4) PL1 does not have a register for 3-state/open drain setup. Moreover, there is no open drain function at the time of an output port. Figure 3.5.46 Port L register
92CM27-115
2005-04-20
TMP92CM27
3.5.13 Port M (PM0 to PM7)
Port M are a port only for inputs. There are the following functions in addition to an input port. The input function of A/D converter(AN0 to AN7) The input function of Key input(KI0 to KI7) These functions operate by setting the bit concerned of PMFC and KIEN register. PMFC is set in "1", is reset KIEN in "0" by the reset operation, and all bits become analog inputs.
KWI
PM0 to PM7 8-OR
rising/falling edge detection
Reset Function control (on bit basis) PMFC write Reset Internal data bus Key input rising/falling control (on bit basis) KICR write Reset Key input ENABLE (on bit basis) KIEN write PM0 to PM7 (KI0 to KI7/AN0 to AN7)
PM read Conversion Result Register
ADREG read
A/D Converter
Channel Selector
Figure 3.5.47
Port M(PM0 to PM7)
92CM27-116
2005-04-20
TMP92CM27
Port M register
7
PM (0058H) bit Symbol Read/Write After reset
6
PM6
5
PM5
4
PM4 R
3
PM3
2
PM2
1
PM1
0
PM0
PM7
Data from external port
Note) The input channel selection of the A/D converter is set by A/D converter mode register ADMOD1. Port M Function register
7
PMFC (005BH) bit Symbol Read/Write After reset
6
PM6F 1
5
PM5F 1
4
PM4F W 1
3
PM3F 1
2
PM2F 1
1
PM1F 1
0
PM0F 1
PM7F 1
0: Input port/Key input
1: Analog input
Key input Enable register
7
KIEN (009EH) bit Symbol Read/Write After reset
6
KI6EN 0
KI6 input 0: Disable 1: Enable
5
KI5EN 0
KI5 input 0: Disable 1: Enable
4
KI4EN W 0
KI4 input 0: Disable 1: Enable
3
KI3EN 0
KI3 input 0: Disable 1: Enable
2
KI2EN 0
KI2 input 0: Disable 1: Enable
1
KI1EN 0
KI1 input 0: Disable 1: Enable
0
KI0EN 0
KI0 input 0: Disable 1: Enable
KI7EN 0
KI7 input 0: Disable 1: Enable
Key input Control register
7
KICR (009FH) bit Symbol Read/Write After reset
KI7EDGE
6
KI6EDGE
5
KI5EDGE
4
KI4EDGE
3
KI3EDGE
2
KI2EDGE
1
KI1EDGE
0
KI0EDGE
W 0
KI7 edge 0: Rising 1: Falling
0
KI6 edge 0: Rising 1: Falling
0
KI5 edge 0: Rising 1: Falling
0
KI4 edge 0: Rising 1: Falling
0
KI3 edge 0: Rising 1: Falling
0
KI2 edge 0: Rising 1: Falling
0
KI1 edge 0: Rising 1: Falling
0
KI0 edge 0: Rising 1: Falling
Note) Read-modify-write is prohibited for PMFC, KIEN and KICR.
Figure 3.5.48
Port M register
92CM27-117
2005-04-20
TMP92CM27
3.5.14 Port N(PN0 to PN3)
Port N are a port only for inputs. There are the following functions in addition to an input port. The input function of A/D converter(AN8 to AN10, AN11/ ADTRG ) The input function of Key input(KI0 to KI7) These functions operate by setting the bit concerned of PNFC and KIEN register. PNFC is set in "1" by the reset operation, and all bits become analog inputs.
Reset Function control (on bit basis) PNFC write PN0(AN8) PN1(AN9) PN2(AN10) PN3(AN11, ADTRG ) A/D Converter Channel Selector
Internal data bus
PN read Conversion Result Register
AD read
ADTRG (only PN3)
Figure 3.5.49
Port N(PN0 to PN3)
92CM27-118
2005-04-20
TMP92CM27
Port N register
7
PN bit Symbol (005CH) Read/Write After reset
6
5
4
3
PN3
2
PN2 R
1
PN1
0
PN0
Data from external port
Note) The input channel selection of the A/D converter is set by A/D converter mode register ADMOD1. Moreover, the setting of AD trigger ( ADTRG ) input permission is set by ADMOD2. Port N Function register
7
PNFC bit Symbol (005FH) Read/Write After reset
6
5
4
3
PN3F 1
2
PN2F W 1
1
PN1F 1
0
PN0F 1
0: Input port 1: Analog input
Note) Read-modify-write is prohibited for PNFC.
Figure 3.5.50
Port N register
92CM27-119
2005-04-20
TMP92CM27
3.6
Memory Controller
Functions
TMP92CM27 has a memory controller with a variable 6-block address area that controls as follows. (1) 6-block address area support Specifies a start address and a block size for 6-block address area (block 0 to 5). * * * SRAM or ROM : All CS blocks (CS0 to CS5) are supported. SDRAM Page ROM : Only CS3 blocks are supported. : Only CS2 blocks are supported.
3.6.1
(2) Connecting memory specifications Specifies SRAM, ROM and SDRAM as memories that connect with the selected address areas. (3) Data bus width selection Whether 8 bits, 16 bits is selected as the data bus width of the respective block address areas. (4) Wait control Wait specification bit in the control register and WAIT input pin control the number of waits in the external bus cycle. Read cycle and write cycle can specify the number of waits individually. The number of waits is controlled in 6 mode mentioned below. 0 waits, 1 wait, 2 waits, 3 waits, 4 waits N waits (controls with WAIT pin)
3.6.2
Control Register and Operation after Reset Release
This section describes the registers that control the memory controller, the after reset release state and necessary settings. (1) Control register The control registers of the memory controller are follows and Table 3.6.1 and Table 3.6.2. * Control register: BnCSH/BnCSL (n = 0 to 5, EX) Sets the basic functions of the memory controller; the memory type that is connected, the number of waits whish is read and written. Memory start address register: MSARn (n = 0 to 5) Sets a start address in the selected address areas. Memory address mask register: MAMR (n = 0 to 5) Sets a block size in the selected address areas. Page ROM control register: PMEMCR Sets method of accessing page ROM.
* * *
92CM27-120
2005-04-20
TMP92CM27
Table 3.6.1 Control Register 7
B0CSL (0140H) B0CSH (0141H) MAMR0 (0142H) Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset MSAR0 (0143H) B1CSL (0144H) B1CSH (0145H) MAMR1 (0146H) Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset MSAR1 (0147H) Bit symbol Read/Write After reset B2CSL (0148H) B2CSH (0149H) Bit symbol Read/Write After reset Bit symbol Read/Write After reset MAMR2 (014AH) MSAR2 (014BH) Bit symbol Read/Write After reset Bit symbol Read/Write After reset B3CSL (014CH) B3CSH (014DH) Bit symbol Read/Write After reset Bit symbol Read/Write After reset MAMR3 (014EH) MSAR3 (014FH) Bit symbol Read/Write After reset Bit symbol Read/Write After reset 1 1 1 1 1 M3S23 1 M3S22 1 M3S21 1 M3S20 R/W 1 1 1 1 0 M3V22 0 (Note) M3V21 0 (Note) M3V20 0 M3V19 R/W 1 M3S19 1 M3S18 1 M3S17 1 M3S16 B3E 0 - 1 1 B3WW2 1 B3WW1 W 1 - 0 B3REC W 0 M3V18 0 M3V17 0 M3V16 0 M3V15 B3OM1 0 B3OM0 1 B3WW0 1 M2S23 1 M2S22 1 M2S21 1 M2S20 R/W 1 1 B3WR2 1 B3WR1 W 1 B3BUS1 0 B3BUS0 1 B3WR0 1 M2V22 0 M2V21 0 (Note) M2V20 0 M2V19 R/W 1 M2S19 1 M2S18 1 M2S17 1 M2S16 B2E 0 B2M 1 1 B2WW2 1 B2WW1 W 1 - 0 B2REC W 0 M2V18 0 M2V17 0 M2V16 0 M2V15 B2OM1 0 B2OM0 1 B2WW0 1 M1S23 1 M1S22 1 M1S21 1 M1S20 R/W 1 1 B2WR2 1 B2WR1 W 1 B2BUS1 0 B2BUS0 1 B2WR0 0 M1V21 0 (Note) M1V20 0 (Note) M1V19 0 M1V18 R/W 1 M1S19 1 M1S18 1 M1S17 1 M1S16 B1E 0 - 1 1 B1WW2 1 B1WW1 W 1 - 0 B1REC W 0 M1V17 0 M1V16 0 M1V15 to M1V9 0 M1V8 B1OM1 0 B1OM0 1 B1WW0 1 M0S23 1 M0S22 1 M0S21 1 M0S20 R/W 1 1 B1WR2 1 B1WR1 W 1 B1BUS1 0 B1BUS0 1 B1WR0 0 M0V20 0 (Note) M0V19 0 (Note) M0V18 0 M0V17 R/W 1 M0S19 1 M0S18 1 M0S17 1 M0S16 B0E 0 -
6
B0WW2
5
B0WW1 W 1 -
4
B0WW0 0 B0REC W
3
2
B0WR2 0
1
B0WR1 W 1 B0BUS1 0 M0V14 to M0V9
0
B0WR0 0 B0BUS0 0 M0V8
B0OM1 0 M0V16
B0OM0 0 M0V15
Note 1: Always write "0". Note 2: Read modify write is prohibited for BnCSL and BnCSH (n = 0 to 3) registers.
92CM27-121
2005-04-20
TMP92CM27
Table 3.6.2 Control Register 7
B4CSL (0150H) B4CSH (0151H) MAMR4 (0152H) MSAR4 (0153H) B5CSL (0154H) B5CSH (0155H) MAMR5 (0156H) MSAR5 (0157H) BEXCSH (0159H) BEXCSL (0158H) Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset Bit symbol Read/Write After reset PMEMCR Bit symbol (0166H) Read/Write After reset Note 1: Always write "0". Note 2: Read modify write is prohibited for BnCSL, BnCSH(n = 4 to 5), BEXCSH and BEXCSL registers. 0 BEXWW2 BEXWW1 W 1 0 OPGE 0 OPWR1 0 0 OPWR0 R/W 0 1 0 BEXWW0 0 0 BEXWR2 1 1 1 1 1 M5S23 1 M5S22 1 M5S21 1 M5S20 R/W 1 BEXOM1 1 BEXOM0 W 0 BEXWR1 W 1 PR1 0 PR0 0 BEXWR0 1 BEXBUS1 1 BEXBUS0 0 M5V22 0 (Note) M5V21 0 (Note) M5V20 0 M5V19 R/W 1 M5S19 1 M5S18 1 M5S17 1 M5S16 B5E 0 - 1 1 B5WW2 1 B5WW1 W 1 - 0 B5REC W 0 M5V18 0 M5V17 0 M5V16 0 M5V15 B5OM1 0 B5OM0 1 B5WW0 1 M4S23 1 M4S22 1 M4S21 1 M4S20 R/W 1 1 B5WR2 1 B5WR1 W 1 B5BUS1 0 B5BUS0 1 B5WR0 0 M4V22 0 (Note) M4V21 0 (Note) M4V20 0 M4V19 R/W 1 M4S19 1 M4S18 1 M4S17 1 M4S16 B4E 0 B4M
6
B4WW2
5
B4WW1 W 1 -
4
B4WW0 0 B4REC W
3
2
B4WR2 0
1
B4WR1 W 1 B4BUS1 0 M4V16
0
B4WR0 0 B4BUS0 0 M4V15
B4OM1 0 M4V18
B4OM0 0 M4V17
(2) Operation after reset release The start data bus width is determined depending on state of AM1/AM0 pins just after reset release. Then, the external memory is accessed as follows AM1
0 0 1 1
AM0
0 1 0 1
Start Mode
Don't use this setting Start with 16-bit data bus (Note) Start with 8-bit data bus (Note) Don't use this setting
Note: A memory to be used as starting after reset is either NOR flash, masked ROM. SDRAM can't be used.
AM1/AM0 pins are valid only just after release reset. In the other cases, the data bus width is the value which is set to the control register . By reset, only control register (B2CSH/B2CSL) of the block address area 2 becomes effective automatically (B2CSH is set to "1" by reset).
92CM27-122
2005-04-20
TMP92CM27
The data bus width which is specified by AM1/AM0 pins are loaded to the bit for specification the bus width of the control register in the block address area 2. The block address area 2 is set to 000000H to FFFFFFH address by reset (B2CSH is reset to "0"). After release reset, the block address areas are specified by the memory start address register (MSARn) and the memory address mask register (MAMRn). Then the control register (BnCSH/L) is set. Set the enable bit (BnCSH) of the control register to "1" for enable the setting.
92CM27-123
2005-04-20
TMP92CM27
3.6.3
Basic Functions and Register Setting
In this section, setting of the block address area, the connecting memory and the number of waits out of the memory controller's functions are described. (1) Block address area specification The block address area is specified by two registers. The memory start address register (MSARn) sets the start address of the block address areas. The memory controller compares between the register value and the address every bus cycles. The address bit which is masked by the memory address mask register (MAMRn) is not compared by the memory controller. The block address area size is determined by setting the memory address mask register. The value that is set to the register is compared with the block address area on the bus. If the compared result is a match, the memory controller sets the chip select signal (CSn) to "low". (i) Memory start address register setting The MS23 to 16 bits of the memory start address register correspond with addresses A23 to A16 respectively. The lower start addresses A15 to A0 are always set to address 0000H. Therefore the start addresses of the block address area are set to addresses 000000H to FF0000H every 64 Kbytes. (ii) Memory address mask registers setting The memory address mask register sets whether an address bit is compared or not. In register setting, "0" is "compare", or "1" is "not compare". The address bits that can set depend on the block address area. Block address area 0: A20 to A8 Block address area 1: A21 to A8 Block address area 2 to 5: A22 to A15 The upper bits are always compared. The block address area size is determined by the compared result. The size to be set depending on the block address area is as follows.
Size (bytes)
CS area CS0 CS1 CS2 to CS5
256
512
32 K
64 K
128 K 256 K 512 K
1M
2M
4M
8M
Note:
After release reset, only the control register of the block address area 2 is valid. The control register of the block address area 2 has bit. If bit set to "0", the block address area 2 is set to addresses 000000H to FFFFFFH. (After release reset state is this state). If bit set to "1", the start address and the address area size is set, as in the other block address area.
92CM27-124
2005-04-20
TMP92CM27
(iii) Example of register setting To set the block address area 512bytes from address 110000H, set the register as follows. MSAR1 Register Bit
Bit symbol Specified value
7
M1S23 0
6
M1S22 0
5
M1S21 0
4
M1S20 1
3
M1S19 0
2
M1S18 0
1
M1S17 0
0
M1S16 1
M1S23 to M1S16 bits of the memory start address register MSAR1 correspond with address A23 to A16. A15 to A0 are set to "0". Therefore if MSAR1 is set to above values, the start address of the block address area is set to address 110000H. MAMR1 Register Bit
Bit symbol Specified value
7
M1V21 0
6
M1V20 0
5
M1V19 0
4
M1V18 0
3
M1V17 0
2
M1V16 0
1
M1V15 to M1V9
0
M1V8 1
0
M1V21 to M1V16 and M1V8 bits of the memory address mask register MAMR1 set whether address A21 to A16 and A8 are compared or not. In register setting, "0" is "compare", or "1" is "not compare". M1V15 to M1V9 bits set whether address A15 to A9 are compared or not with 1 bit. A23 and A22 are always compared. If it set to like an above setting, A23 to A9 is compared with the value that is set as the start addresses. Therefore 512 bytes (addresses 110000H to 1101FFH) are set as the block address area 1, and if it is compared with the addresses on the bus, the chip select signal CS1 is set to "low". The other block address area sizes are specified like this. A23 and A22 are always compared in the block address area 0. Whether A20 to A8 are compared or not is set to register. Similarly, A23 is always compared in block address areas 2 to 5. Whether A22 to A15 are compared or not is set to register. Note 1: When the set block address area overlaps with the built-in memory area, or both two address areas overlap, the block address area is processed according to priority as follows. Built-in I/O > Built-in memory > Block address area 0 > 1 > 2 > 3 > 4 > 5 Note 2: If address area that is set in CS0 to CS5 was accessed, area is regarded as CSEX area. Therfore, wait number and data bus width controls becomes setting of CSEX (BEXCSH, BEXCSL register).
92CM27-125
2005-04-20
TMP92CM27
(2) Connection memory specification Setting the bit of the control register (BnCSH) specifies the memory type that is connected with the block address areas. The interface signal is outputted according to the set memory as follows. Bit (BnCSH Register)
0 0 1 1

0 1 0 1 (Reserved) (Reserved) SDRAM
Function
SRAM/ROM (Default)
Note 1: SDRAM should be set to block either 3. (3) Data bus width specification The data bus width is set for every block address area. The bus size is set by setting the control register (BnCSH) as follows. bit (BnCSH Register) BnBUS 1
0 0 1 1
BnBUS 0
0 1 0 1
Function
8-bit bus mode (Default) 16-bit bus mode Don't use this setting Don't use this setting
Note: SDRAM should be set to either "01" (16-bit bus). This method of changing the data bus width depending on the accessing address is called "dynamic bus sizing". Part which data is outputted is changed by changing data size, bus width and start address. Note: Since there is a possibility of abnormal writing/reading of the data if two memories with different bus width are put in consecutive address, do not execute a access to both memories with one command.
92CM27-126
2005-04-20
TMP92CM27
Operand Data Size (bit)
Operand Start Address 4n + 0 4n + 1
Memory Data Size (bit) 8/16 8 8/16 8 16 8 16 8 16
CPU Address 4n + 0 4n + 1 4n + 2 4n + 3 4n + 3 (1) 4n + 0 (2) 4n + 1 4n + 0 (1) 4n + 1 (2) 4n + 2 (1) 4n + 1 (2) 4n + 2 (1) 4n + 2 (2) 4n + 1 4n + 2 (1) 4n + 3 (2) 4n + 4 (1) 4n + 3 (2) 4n + 4 (1) 4n + 0 (2) 4n + 1 (3) 4n + 2 (4) 4n + 3 (1) 4n + 0 (2) 4n + 2 (1) 4n + 0 (2) 4n + 1 (3) 4n + 2 (4) 4n + 3 (1) 4n + 1 (2) 4n + 2 (3) 4n + 4 (1) 4n + 2 (2) 4n + 3 (3) 4n + 4 (4) 4n + 5 (1) 4n + 2 (2) 4n + 4 (1) 4n + 3 (2) 4n + 4 (3) 4n + 5 (4) 4n + 6 (1) 4n + 3 (2) 4n + 4 (3) 4n + 6
CPU Data D15 to D8 xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx b15 to b8 xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx b15 to b8 xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 b31 to b24 xxxxx xxxxx xxxxx xxxxx b7 to b0 b23 to b16 xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 b31 to b24 xxxxx xxxxx xxxxx xxxxx b7 to b0 b23 to b16 xxxxx D7 to D0 b7 to b0 b7 to b0 b7 to b0 b7 to b0 xxxxx b7 to b0 b15 to b8 b7 to b0 b7 to b0 b15 to b8 xxxxx b15 to b8 b7 to b0 b15 to b8 b7 to b0 b7 to b0 b15 to b8 xxxxx b15 to b8 b7 to b0 b15 to b8 b23 to b16 b31 to b24 b7 to b0 b23 to b16 b7 to b0 b15 to b8 b23 to b16 b31 to b24 xxxxx b15 to b8 b31 to b24 b7 to b0 b15 to b8 b23 to b16 b31 to b24 b7 to b0 b23 to b16 b7 to b0 b15 to b8 b23 to b16 b31 to b24 xxxxx b15 to b8 b31 to b24
8
4n + 2 4n + 3 4n + 0
4n + 1
16
4n + 2
8 16 8 16
4n + 3
4n + 0
8
16 4n + 1 8
16 32
4n + 2
8
16 4n + 3 8
16
xxxxx: During a read, data input to the bus ignored. At write, the bus is at high impedance and the write strobe signal remains non to active.
92CM27-127
2005-04-20
TMP92CM27
(4) Wait control The external bus cycle completes a wait of two states at least (100 ns at fSYS = 20 MHz). Setting the and of BnCSL specifies the number of waits in the read cycle and the write cycle. is set with the same method as . / (BnCSL Register)
0 0 1 1 1 0 0 1 0 1 1 1 Others 1 0 1 0 1 1
Function
2 states (0 waits) access fixed mode 3 states (1 wait) access fixed mode (Default) 4 states (2 waits) access fixed mode 5 states (3 waits) access fixed mode 6 states (4 waits) access fixed mode
WAIT pin input mode
(Reserved)
Note 1: For SDRAM, above setting is invalid. So, refer 3.13 SDRAM controller. (i) Waits number fixed mode The bus cycle is completed with the states which is set. The number of states is selected from 2 states (0 waits) to 6 states (4 waits). (ii) WAIT pin input mode This mode samples the WAIT input pins. And this mode inserts wait continuously in during signal is actived. The bus cycle is minimum 2 states. The bus cycle is completed if the wait signal is non active ("High" level) at 2 states. The bus cycle continue with that is extended if the wait signal is active at 2 states and more.
92CM27-128
2005-04-20
TMP92CM27
(5) Recovery (Data hold) cycle control Some memory is defined an AC specification about data hold time by CE or OE for read cycle. Therefore, a data confliction problem may occur. To avoid this problem, 1-dummy cycle can be inserted after CSm-block access cycle by setting "1" to BmCSH. This 1-dummy cycle is inserted when the next cycle is for another CS-block. (BnCSH register)
0 1 No dummy cycle is inserted (Default). Dummy cycle is inserted.
*
When no inserting a dummy cycle (0 waits)
SDCLK A23 to A0
CSm
CSn RD
*
When inserting a dummy cycle (0 waits)
Dummy SDCLK A23 to A0
CSm
CSn RD
92CM27-129
2005-04-20
TMP92CM27
(6) Basic bus timing (a) External read/write cycle (0 waits)
SDCLK (20 MHz)
CSn
T1
T2
A23 to A0
RD , SRxxB
Read D15 to D0
SRWR , SRxxB WRxx
Input
Write Output
D15 to D0
(b) External read/write cycle (1 wait)
SDCLK (20 MHz)
CSn
T1
TW
T2
A23 to A0
RD , SRxxB
Read D15 to D0
SRWR , SRxxB WRxx
Input
Write Output
D15 to D0
92CM27-130
2005-04-20
TMP92CM27
(c) External read/write cycle (0 waits at WAIT pin input mode)
SDCLK (20 MHz)
CSn
T1
T2
A23 to A0
RD , SRxxB
Read D15 to D0
SRWR , SRxxB WRxx
Input
Write Output
D15 to D0
WAIT
Sampling
(d) External read/write cycle (n waits at WAIT pin input mode)
SDCLK (20 MHz)
CSn
T1
TW
T2
A23 to A0
RD , SRxxB
Read D15 to D0
SRWR , SRxxB WRxx
Input
Write Output
D15 to D0
WAIT
Sampling
Sampling
92CM27-131
2005-04-20
TMP92CM27
Example of wait input cycle (5 waits)
FF0 D CK
Q
FF1 D CK
Q
FF2 D CK
Q
FF3 D CK
Q
FF4 D CK
Q
WAIT
RES
RES
RES
RES
RES
SDCLK
CSn RD SRWR
SDCLK (20 MHz)
CSn RD
1
2
3
4
5
6
7
FF_RES FF0_D FF0_Q FF1_Q FF2_Q FF3_Q
WAIT
92CM27-132
2005-04-20
TMP92CM27
(7) Connecting external memory Figure 3.6.1 shows an example of method of connecting external 16-bit SRAM and 16-bit NOR flash to the TMP92CM27.
TMP92CM27
RD SRLLB SRLUB SRWR CS0
16-bit SRAM
OE LDS UDS
R/W
CE
D [15:0] A0 A1 A2 A3
Not connect
I/O [16:1] A0 A1 A2 16-bit NOR flash
OE WE CE
CS2
DQ [15:0] A0 A1 A2
Figure 3.6.1 Example of External 16-Bit SRAM and NOR Flash Connection
92CM27-133
2005-04-20
TMP92CM27
3.6.4
ROM Control (Page mode)
This section describes ROM page mode accessing and how to set registers. ROM page mode is set by the page ROM control register. (1) Operation and how to set the registers TMP92CM27 supports ROM access of the page mode. The ROM access of the page mode is specified only in the block address area 2. ROM page mode is set by the page ROM control register (PMEMCR). Setting of the PMEMCR register to "1" sets the memory access of the block address area to ROM page mode access. The number of read cycles is set by the of the PMEMCR register. (PMEMCR register)
0 0 1 1 0 1 0 1
Number of Cycle in a Page
1 state (n-1-1-1 mode) (n 2) 2 state (n-2-2-2 mode) (n 3) 3 state (n-3-3-3 mode) (n 4) (Reserved)
Note: Set the number of waits "n" to the control register (BnCSL) in each block address area. The page size (the number of bytes) of ROM in the CPU size is set to the of the PMEMCR register. When data is read out until a border of the set page, the controller completes the page reading operation. The start data of the next page is read in the normal cycle. The following data is set to page read again. Bit (PMEMCR register)
0 0 1 1

0 1 0 1 64 bytes 32 bytes
ROM Page Size
16 bytes (Default) 8 bytes
For the signal timing pulse, see ROM read cycle in section 4.3.2.
92CM27-134
2005-04-20
TMP92CM27
3.6.5
Cautions
(1) Note the timing between CS and RD If the parasitic capacitance of the RD (Read signal) is greater than that of the CS (Chip select signal), it is possible that an unintended read cycle occurs due to a delay in the read signal. Such an unintended read cycle may cause a trouble as in the case of (a) in Figure 3.6.2.
SDCLK (20 MHz) A23 to 0
CSm CSn RD
(a)
Figure 3.6.2 Read Signal Delay Read Cycle Example: When using an externally connected NOR flash which users JEDEC standard commands, note that the toggle bit may not be read out correctly. If the read signal in the cycle immediately preceding the access to the NOR flash does not go high in time, as shown in Figure 3.6.3, an unintended read cycle like the one shown in (b) may occur.
Memory access SDCLK (20 MHz) A23 to A0 NOR flash chip select
RD
Toggle bit RD cycle
Toggle bit (b)
Figure 3.6.3 NOR Flash Toggle Bit Read Cycle When the toggle bit reverse with this unexpected read cycle, CPU always reads same value of the toggle bit, and cannot read the toggle bit correctly. To avoid this phenomenon, the data polling function control is recommended.
92CM27-135
2005-04-20
TMP92CM27
(2) The cautions at the time of the functional change of a CSn . A chip select signal output has the case of a combination terminal with a general-purpose port function. In this case, an output latch register and a function control register are initialized by the reset action, and an object terminal is initialized by the port output ("1" or "0") by it. Functional change Although an object terminal is changed from a port to a chip select signal output by setting up a function control register (PnFC register), the short pulse for several ns may be outputted to the changing timing. Although it does not become especially a problem when using the usual memory, it may become a problem when using a special memory.
XX is a function register address.(When an output port is initialized by "0") A port is set as CSn . Internal signal Internal address bus Function control signal Output port External signal Pxx A23 to A0 n n+2 Output pulse CSn n XX n+2
The measure by software The countermeasures in S/W for avoiding this phenomenon are explained. Since CS signal decodes the address of the access area and is generated, an unnecessary pulse is outputted by access to the object CS area immediately after setting it as a CSn function. Then, if internal area is accessed also immediately after setting a port as CS function, an unnecessary pulse will not output. 1. Prohibition of use of an NMI function 2. The ban on interruption under functional change (DI command) 3. A dummy command is added in order to carry out continuous internal access. (Access to a functional change register is corresponded by 16-bit command. (LDW command))
A port is set as CSn . Internal address bus Function control signal Output port signal Pxx A23 to A0 n n+2 XX XX+1 Dummy access n+2
Internal
signal
CSn
External
92CM27-136
2005-04-20
TMP92CM27
3.7
8-Bit Timers (TMRA)
The TMP92CM27 features 8 built-in 8-bit timers. These timers are paired into four modules: TMRA01, TMRA23, TMRA45 and TMRA67. Each module consists of two channels and can operate in any of the following four operating modes. * 8-bit interval timer mode * * * 16-bit interval timer mode 8-bit programmable square wave pulse generation output mode (PPG: Variable duty cycle with variable period) 8-bit pulse width modulation output mode (PWM: Variable duty cycle with constant period)
Figure 3.7.1 to Figure 3.7.4 show block diagrams for TMRA01, TMRA23, TMRA45 and TMRA67. Each channel consists of an 8-bit up counter, an 8-bit comparator and an 8-bit timer register. In addition, a timer flip-flop and a prescaler are provided for each pair of channels. The operation mode and timer flip-flops are controlled by five-byte controls SFR (Special-function registers). Each of the four modules (TMRA01, TMRA23, TMRA45 and TMRA67) can be operated independently. All modules operate in the same manner; hence only the operation of TMRA01 is explained here. The contents of this chapter are as follows. 3.7.1 Block diagrams 3.7.2 Operation of Each Circuit 3.7.3 SFRs 3.7.4 Operation in Each Mode (1) 8-bit timer mode (2) 16-bit timer mode (3) 8-bit PPG (Programmable pulse generation) output mode (4) 8-bit PWM (Pulse width modulation) output mode (5) Mode settings Table 3.7.1 Module Specification
External pin Input pin for external clock Output pin for timer flip-flop Timer RUN register SFR (Address) Timer register Timer mode register Timer flip-flop control register
Registers and Pins for Each Module TMRA23
TA2IN (Shared with PF2) TA3OUT (Shared with PF3) TA23RUN (1108H) TA2REG (110AH) TA3REG (110BH) TA23MOD(110CH) TA3FFCR(110DH)
TMRA01
TA0IN (Shared with PF0) TA1OUT (Shared with PF1) TA01RUN (1100H) TA0REG (1102H) TA1REG (1103H) TA01MOD(1104H) TA1FFCR(1105H)
TMRA45
TA4IN (Shared with PF4) TA5OUT (Shared with PF5) TA45RUN (1110H) TA4REG (1112H) TA5REG (1113H) TA45MOD(1114H) TA5FFCR(1115H)
TMRA67
TA6IN (Shared with PF6) TA7OUT (Shared with PL3) TA67RUN (1118H) TA6REG (111AH) TA7REG (111BH) TA67MOD(111CH) TA7FFCR(111DH)
92CM27-137
2005-04-20
3.7.1
Prescaler 2 T1 T4 T16 T256 4 8 16 32 64 128 256 512 Run/clear TA01RUN Timer flip-flop TA1FF TA01RUN Selector TA1FFCR 8-bit up counter (UC1) 8-bit up counter (UC0) 2n overflow TA01MOD TA01MOD T1 T16 T256
Prescaler clock: T0
Block Diagrams
Timer flip-flop output: TA1OUT
TA01RUN Selector T1 T4 T16 TA01MOD
Figure 3.7.1
External input clock: TA0IN
92CM27-138
8-bit comparator (CP0) Match detect TA0TRG TA01MOD 8-bit timer register TA0REG TA01RUN Register buffer 0 Internal data bus TMRA0 interrupt output: INTTA0
TMRA01 Block Diagram
8-bit comparator (CP1)
Match detect
8-bit timer register TA1REG
TMP92CM27
2005-04-20
Internal data bus TMRA0 match output: TA0TRG
TMRA1 interrupt output: INTTA1
Prescaler 2 T1 T4 T16 T256 4 8 16 32 64 128 256 512 Run/clear TA23RUN Timer flip-flop TA3FF TA23RUN Selector 8-bit up counter (UC2) 2n overflow TA23MOD 8-bit up counter (UC3) T1 T16 T256 TA23MOD TA3FFCR
Prescaler clock: T0
Timer flip-flop output: TA3OUT
TA23RUN Selector T1 T4 T16 TA23MOD
Figure 3.7.2
External input clock: TA2IN
92CM27-139
8-bit comparator (CP2) Match detect TA2TRG TA23MOD 8-bit timer register TA2REG TA23RUN Register buffer 2 Internal data bus TMRA2 interrupt output: INTTA2
TMRA23 Block Diagram
8-bit comparator register (CP3)
Match detect
8-bit timer register TA3REG
TMP92CM27
2005-04-20
Internal data bus TMRA2 match output: TA2TRG
TMRA3 interrupt outptu: INTTA3
Prescaler 2 T1 T4 T16 T256 4 8 16 32 64 128 256 512 Run/clear TA45RUN Timer flip-flop TA5FF TA45RUN Selector 8-bit up counter (UC4) 2n overflow TA45MOD 8-bit up counter (UC5) T1 T16 T256 TA45MOD TA5FFCR
Prescaler clock: T0
Timer flip-flop output: TA5OUT
TA45RUN Selector T1 T4 T16 TA45MOD
Figure 3.7.3
External input clock: TA4IN
92CM27-140
8-bit comparator (CP4) Match detect TA4TRG TA45MOD 8-bit timer register TA4REG TA45RUN Register buffer 4 Internal data bus TMRA4 interrupt output: INTTA4
TMRA45 Block Diagram
8-bit comparator register (CP5)
Match detect
8-bit timer register TA5REG
TMP92CM27
2005-04-20
Internal data bus TMRA4 match output: TA4TRG
TMRA5 interrupt outptu: INTTA5
Prescaler 2 T1 T4 T16 T256 4 8 16 32 64 128 256 512 Run/clear TA67RUN Timer flip-flop TA7FF TA67RUN Selector 8-bit up counter (UC6) 2n overflow TA67MOD TA67MOD 8-bit up counter (UC7) T1 T16 T256 TA7FFCR
Prescaler clock: T0
Timer flip-flop output: TA7OUT
TA67RUN Selector T1 T4 T16 TA67MOD
Figure 3.7.4
External input clock: TA6IN
92CM27-141
8-bit comparator (CP6) Match detect TA6TRG TA67MOD 8-bit timer register TA6REG TA67RUN Register buffer 6 Internal data bus TMRA6 interrupt output: INTTA6
TMRA67 Block Diagram
8-bit comparator register (CP7)
Match detect
8-bit timer register TA7REG
TMP92CM27
2005-04-20
Internal data bus TMRA6 match output: TA6TRG
TMRA7 interrupt outptu: INTTA7
TMP92CM27
3.7.2
Operation of Each Circuit
(1) Prescaler A 9-bit prescaler generates the input clock to TMRA01. The prescaler's operation can be controlled using TA01RUN in the timer control register. Setting to "1" starts the count; setting to "0" clears the prescaler to zero and stops operation. Table 3.7.2 shows the various prescaler output clock resolutions.
Table 3.7.2 System clock selection Gear Value
000 (fc) 001 (fc/2) 0(fc) 010 (fc/4) 011 (fc/8) 100 (fc/16)
Prescaler Output Clock Resolution
at fc = 40 MHz
Cycle
T1 23/fc (0.2 s) 2 /fc (0.4 s)
4 5 6
T4 25/fc (0.8 s) 2 /fc (1.6 s)
6 7 8
T16 27/fc (3.2 s) 2 /fc (6.4 s)
8 9
T256 211/fc (51.2 s) 212/fc (102.4 s) 213/fc (204.8 s) 214/fc (409.6 s) 215/fc (819.2 s)
2 /fc (0.8 s) 2 /fc (1.6 s) 27/fc (3.2 s)
2 /fc (3.2 s) 2 /fc (6.4 s) 29/fc (12.8 s)
2 /fc (12.8 s) 2 /fc (25.6 s)
10
211/fc (51.2 s)
xxx: Don't care
(2) Up counters (UC0 and UC1) These are 8-bit binary counters which count up the input clock pulses for the clock specified by TA01MOD. The input clock for UC0 is selectable and can be either the external clock input via the TA0IN pin or one of the three internal clocks T1, T4, or T16. The clock setting is specified by the value set in TA01MOD . The input clock for UC1 depends on the operation mode. In 16-bit timer mode, the overflow output from UC0 is used as the input clock. In any mode other than 16-bit timer mode, the input clock is selectable and can either be one of the internal clocks T1, T16, or T256, or the comparator output (The match detection signal) from TMRA0. For each interval timer the timer operation control register bits TA01RUN and TA01RUN can be used to stop and clear the up counters and to control their count. A reset releases both up counters, stopping the timers.
92CM27-142
2005-04-20
TMP92CM27
(3) Timer registers (TA0REG and TA1REG) These are 8-bit registers, which can be used to set a time interval. When the value set in the timer register TA0REG or TA1REG matches the value in the corresponding up counter, the comparator match detect signal goes Active. If the value set in the timer register is 00H, the signal goes active when the up counter overflows. The TA0REG are double buffer structure, each of which makes a pair with register buffer0. The setting of the bit TA01RUN determines whether TA0REG's double buffer structure is enabled or disabled. It is disabled if = "0" and enabled if = "1". When the double buffer is enabled, data is transferred from the register buffer0 to the timer register0 when a 2n overflow occurs in PWM mode, or at the start of the PPG cycle in PPG mode. Hence the double buffer cannot be used in timer mode. A reset initializes to "0", disabling the double buffer. To use the double buffer, write data to the timer register0, set to "1", and write the following data to the register buffer0 3.7.5 show the configuration of TA0REG.
Timer register A0 (TA0REG) B Shift trigger Register buffer 0 Selector S A Write to TA0REG Match detecting PPG cycle PWM 2n overflow
Write Internal data bus TA01RUN
Figure 3.7.5
Note:
Timer Register A0 (TA0REG)
The same memory address is allocated to TA0REG and the register buffer0. When = "0", the same value is written to the register buffer0 and TA0REG, when = 1, only the register buffer0 is written to.
The address of each timer register is as follows. TA0REG: 001102H TA1REG: 001103H TA2REG: 00110AH TA3REG: 00110BH TA4REG: 001112H TA5REG: 001113H TA6REG: 00111AH TA7REG: 00111BH All these registers are write-only and cannot be read.
92CM27-143
2005-04-20
TMP92CM27
(4) Comparator (CP0, CP1) The comparator compares the value in an up counter with the value set in a timer register. If they match, the up counter is cleared to 0 and an interrupt signal (INTTA0 or INTTA1) is generated. If timer flip-flop inversion is enabled, the timer flip-flop is inverted at the same time. Note) The timer causes the overflow when the value below the improvement counter value is written in the timer register while the timer is working, and the generation of interrupt by the expected value is not obtained. (It is possible to operate normally if the changed set value is more than the improvement counter value.) Moreover, the Compear circuit doesn't operate in writing only 8-bit subordinate position bits when operating in 16-bit mode. Therefore, please write it in 16-bit in order in 8-bit subordinate position bits and 8-bit high rank bits. (5) Timer flip-flop (TA1FF) The timer flip-flop (TA1FF) is a flip-flop inverted by the match detects signal (8-bit comparator output) of each interval timer. Whether inversion is enabled or disabled is determined by the setting of the bit TA1FFCR in the timer flip-flops control register. A reset clears the value of TA1FF to "0". Programming "01" or "10" to TA1FFCR sets TA1FF to 0 or 1. Programming "00" to these bits inverts the value of TA1FF. (This is known as software inversion.) The TA1FF signal is output via the TA1OUT pin (which can also be used as PF1). When this pin is used as the timer output, the timer flip-flop should be set beforehand using the port F function register PFCR and PFFC. Inversion of TA1FF by each mode 8-bit timer mode : Agreement of UC0 and TA0REG or agreements of UC1 and TA1REG. 16-bit timer mode : Agreement of UC0 and TA0REG and agreements of UC1 and TA1REG. 8-bit PWM mode : Agreement of overflow or UC0 and TA0REG. 8-bit PPG mode : Agreement of UC0 and TA0REG or agreements of UC0 and TA1REG. Note) When the change request by inversion and the register setting with the timer is done at the same time, it is necessary to note it because it becomes the following operation by the state at that time. When inversion by the timer and inversion by register setup occur simultaneously. Only once inversion. When inversion by the timer and "1" set by register setup occur simultaneously. Set to "1". When inversion by the timer and "0" clear by register setup occur simultaneously. Clear to "0".
92CM27-144
2005-04-20
TMP92CM27
3.7.3
SFRs
TMRA01 Run Register 7 6 5 4 3
I2TA01 0 IDLE2 0: Stop 1: Operate
2
TA01PRUN R/W 0 TMRA01 prescaler
1
TA1RUN 0 UC1
0
TA0RUN 0 UC0
TA01RUN Bit symbol (1100H) Read/Write After reset Function
TA0RDE R/W 0 Double buffer 0: Disable 1: Enable
0: Stop and clear 1: Run (Count up)
TA0REG double buffer control 0 1 Disable Enable
Count operation 0 1 Stop and clear Count
Note: The values of bits 4 to 6 of TA01RUN are undefined when read.
TMRA23 Run Register 7
TA23RUN Bit symbol (1108H) Read/Write After reset Function TA2RDE R/W 0 Double buffer 0: Disable 1: Enable 0 IDLE2 0: Stop 1: Operate 0 TMRA23 prescaler
6
5
4
3
I2TA23
2
TA23PRUN R/W
1
TA3RUN 0 UC3
0
TA2RUN 0 UC2
0: Stop and clear 1: Run (Count up)
TA2REG double buffer control 0 1 Disable Enable
Count operation 0 1 Stop and clear Count
Note: The values of bits 4 to 6 of TA23RUN are undefined when read.
Figure 3.7.66666666
8-bit timer register(TA01RUN,TA23RUN)
92CM27-145
2005-04-20
TMP92CM27
TMRA45 Run Register 7
TA45RUN Bit symbol (1110H) Read/Write After reset Function TA4RDE R/W 0 Double buffer 0: Disable 1: Enable 0 IDLE2 0: Stop 1: Operate 0 TMRA45 prescaler
6
5
4
3
I2TA45
2
TA45PRUN R/W
1
TA5RUN 0 UC5
0
TA4RUN 0 UC4
0: Stop and clear 1: Run (Count up)
TA4REG double buffer control 0 1 Disable Enable
Count operation 0 1 Stop and clear Count
Note: The values of bits 4 to 6 of TA45RUN are undefined when read.
TMRA67 Run Register 7
TA67RUN Bit symbol (1118H) Read/Write After reset Function TA6RDE R/W 0 Double buffer 0: Disable 1: Enable 0 IDLE2 0: Stop 1: Operate 0 TMRA67 prescaler
6
5
4
3
I2TA67
2
TA67PRUN R/W
1
TA7RUN 0 UC7
0
TA6RUN 0 UC6
0: Stop and clear 1: Run (Count up)
TA6REG double buffer control 0 1 Disable Enable
Count operation 0 1 Stop and clear Count
Note: The values of bits 4 to 6 of TA67RUN are undefined when read.
Figure 3.7.7777777777777
8-bit timer register(TA45RUN,TA67RUN)
92CM27-146
2005-04-20
TMP92CM27
TMRA01 Mode Register 7
TA01MOD Bit symbol (1104H) Read/Write After reset Function TA01M1 0
6
TA01M0 0
5
PWM01 0 PWM cycle 00: Reserved 01: 26 10: 27 11: 28
4
PWM00 0 R/W
3
TA1CLK1 0
2
TA1CLK0 0
1
TA0CLK1 0
0
TA0CLK0 0
Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode
TMRA1 source clock 00: TA0TRG 01: T1 10: T16 11: T256
TMRA0 source clock 00: TA0IN pin input (Note) 01: T1 10: T4 11: T16
TMRA0 input clock 00 01 10 11 TA0IN (External input) T1 (Prescaler) T4 (Prescaler) T16 (Prescaler)
TMRA1 input clock TA01MOD 01 00 01 10 11
Matching output for TMRA0
TA01MOD = 01
Overflow output for TMRA0
T1 T16 T256
(16-bit timer mode)
Select cycle in PWM mode 00 01 10 11 Reserved 26 x Clock source 27 x Clock source 28 x Clock source
Select operation mode for TMR01 00 01 10 11 Two 8-bit timers 16-bit timer 8-bit PPG 8-bit PWM (TMRA0), 8-bit timer (TMRA1)
Note:
When set TA0IN pin, set TA01MOD after set port F0.
Figure 3.7.8(1)
8-bit timer register8888(TA01MOD)
92CM27-147
2005-04-20
TMP92CM27
TMRA23 Mode Register 7
TA23MOD (110CH) Bit symbol Read/Write After reset Function 0 0 0 PWM cycle 00: Reserved 01: 26 10: 27 11: 28 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode TA23M1
6
TA23M0
5
PWM21
4
PWM20 R/W
3
TA3CLK1 0
2
TA3CLK0 0
1
TA2CLK1 0
0
TA2CLK0 0
TMRA3 source clock 00: TA2TRG 01: T1 10: T16 11: T256
TMRA2 source clock 00: TA2IN pin input (Note) 01: T1 10: T4 11: T16
TMRA2 input clock 00 01 10 11 TA2IN (External input) T1 (Prescaler) T4 (Prescaler) T16 (Prescaler)
TMRA3 input clock TA23MOD 01 00 01 10 11 TA23MOD = 01
Matching output for TMRA2 Overflow output for TMRA2 T1 T16 T256 (16-bit timer mode)
Select cycle in PWM mode 00 01 10 11 Reserved 26 x Clock source 27 x Clock source 28 x Clock source
Select operation mode for TMRA23 00 01 10 11 Two 8-bit timer 16-bit timer 8-bit PPG 8-bit PWM (TMRA2), 8-bit timer (TMRA3)
Note:
When set TA2IN pin, set TA23MOD after set port F2.
Figure 3.7.8(2)8
8-bit timer register(TA23MOD)
92CM27-148
2005-04-20
TMP92CM27
TMRA45 Mode Register 7
TA45MOD (1114H) Bit symbol Read/Write After reset Function 0 0 0 PWM cycle 00: Reserved 01: 26 10: 27 11: 28 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode TA45M1
6
TA45M0
5
PWM41
4
PWM40 R/W
3
TA5CLK1 0
2
TA5CLK0 0
1
TA4CLK1 0
0
TA4CLK0 0
TMRA5 source clock 00: TA4TRG 01: T1 10: T16 11: T256
TMRA4 source clock 00: TA4IN pin input (Note) 01: T1 10: T4 11: T16
TMRA4 input clock 00 01 10 11 TA4IN (External input) T1 (Prescaler) T4 (Prescaler) T16 (Prescaler)
TMRA5 input clock TA45MOD 01 00 01 10 11 TA45MOD = 01
Matching output for TMRA4 Overflow output for TMRA4 T1 T16 T256 (16-bit timer mode)
Select cycle in PWM mode 00 01 10 11 Reserved 26 x Clock source 27 x Clock source 28 x Clock source
Select operation mode for TMRA45 00 01 10 11 Two 8-bit timer 16-bit timer 8-bit PPG 8-bit PWM (TMRA4), 8-bit timer (TMRA5)
Note:
When set TA4IN pin, set TA45MOD after set port F4.
Figure 3.7.9(3)
8-bit timer register(TA45MOD)
92CM27-149
2005-04-20
TMP92CM27
TMRA67 Mode Register 7
TA67MOD (111CH) Bit symbol Read/Write After reset Function 0 0 0 PWM cycle 00: Reserved 01: 26 10: 27 11: 28 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode TA67M1
6
TA67M0
5
PWM61
4
PWM60 R/W
3
TA7CLK1 0
2
TA7CLK0 0
1
TA6CLK1 0
0
TA6CLK0 0
TMRA7 source clock 00: TA6TRG 01: T1 10: T16 11: T256
TMRA6 source clock 00: TA6IN pin input (Note) 01: T1 10: T4 11: T16
TMRA6 input clock 00 01 10 11 TA6IN (External input) T1 (Prescaler) T4 (Prescaler) T16 (Prescaler)
TMRA7 input clock TA67MOD 01 00 01 10 11 TA67MOD = 01
Matching output for TMRA6 Overflow output for TMRA6 T1 T16 T256 (16-bit timer mode)
Select cycle in PWM mode 00 01 10 11 Reserved 26 x Clock source 27 x Clock source 28 x Clock source
Select operation mode for TMRA67 00 01 10 11 Two 8-bit timer 16-bit timer 8-bit PPG 8-bit PWM (TMRA6), 8-bit timer (TMRA7)
Note:
When set TA6IN pin, set TA67MOD after set port F6.
Figure 3.7.10(4)
8-bit timer register(TA67MOD)
92CM27-150
2005-04-20
TMP92CM27
TMRA1 Flip Flop Control Register 7
TA1FFCR (1105H) Bit symbol Read/Write After reset Read-modify Function -write instruction is prohibited. 1 1 00: Invert TA1FF 01: Set TA1FF to "1" 10: Clear TA1FF to "0" 11: Don't care
6
5
4
3
TA1FFC1
2
TA1FFC0 R/W
1
TA1FFIE 0 TA1FF control for inversion 0: Disable 1: Enable
0
TA1FFIS 0 TA1FF Inversion signal select 0: TMRA0 1: TMRA1
Inversion signal for timer flip-flop 1 (TA1FF) (Don't care except in 8-bit timer mode) 0 1 Inversion by TMRA0 Inversion by TMRA1
TA1FF control for inversion 0 1 Disable inversion Enable inversion
TFF1 control 00 Note: The values of bits 4 to 7 of TA1FFCR are undefined when read. 01 10 11 Invert TA1FF Set TA1FF to "1" Clear TA1FF to "0" Don't care
Figure 3.7.11(1)
8-bit timer register(TA1FFCR)
92CM27-151
2005-04-20
TMP92CM27
TMRA3 Flip-Flop Control Register 7
TA3FFCR (110DH) Bit symbol Read/Write After reset Read-modify -write instruction is prohibited. Function 1 1 00: Invert TA3FF 01: Set TA3FF to "1" 10: Clear TA3FF to "0" 11: Don't care
6
5
4
3
TA3FFC1
2
TA3FFC0 R/W
1
TA3FFIE 0 TA3FF control for inversion 0: Disable 1: Enable
0
TA3FFIS 0 TA3FF inversion select 0: TMRA2 1: TMRA3
Inverse signal for timer flip-flop 3 (TA3FF) (Don't care except in 8-bit timer mode) 0 1 Invert TMRA2 Invert TMRA3
TA3FF control for inversion 0 1 Disable inversion Enable inversion
TA3FF control 00 Invert TA3FF Note: The values of bits 4 to 7 of TA3FFCR are undefined when read. 01 Set TA3FF to "1" 10 Clear TA3FF to "0" 11 Don't care
Figure 3.7.9(2)
8-bit timer register(TA3FFCR)
92CM27-152
2005-04-20
TMP92CM27
TMRA5 Flip-Flop Control Register 7
TA5FFCR (1115H) Bit symbol Read/Write After reset Read-modify -write instruction is prohibited. Function 1 1 00: Invert TA5FF 01: Set TA5FF to "1" 10: Clear TA5FF to "0" 11: Don't care
6
5
4
3
TA5FFC1
2
TA5FFC0 R/W
1
TA5FFIE 0 TA5FF control for inversion 0: Disable 1: Enable
0
TA5FFIS 0 TA5FF inversion select 0: TMRA4 1: TMRA5
Inverse signal for timer flip-flop 5 (TA5FF) (Don't care except in 8-bit timer mode) 0 1 Invert TMRA4 Invert TMRA5
TA5FF control for inversion 0 1 Disable inversion Enable inversion
TA5FF control 00 Invert TA5FF Note: The values of bits 4 to 7 of TA5FFCR are undefined when read. 01 Set TA5FF to "1" 10 Clear TA5FF to "0" 11 Don't care
Figure 3.7.9(3)
8-bit timer register(TA5FFCR)
92CM27-153
2005-04-20
TMP92CM27
TMRA7 Flip-Flop Control Register 7
TA7FFCR (111DH) Bit symbol Read/Write After reset Read-modify -write instruction is prohibited. Function 1 1 00: Invert TA7FF 01: Set TA7FF to "1" 10: Clear TA7FF to "0" 11: Don't care
6
5
4
3
TA7FFC1
2
TA7FFC0 R/W
1
TA7FFIE 0 TA7FF control for inversion 0: Disable 1: Enable
0
TA7FFIS 0 TA7FF inversion select 0: TMRA6 1: TMRA7
Inverse signal for timer flip-flop 7 (TA7FF) (Don't care except in 8-bit timer mode) 0 1 Invert TMRA6 Invert TMRA7
TA7FF control for inversion 0 1 Disable inversion Enable inversion
TA7FF control 00 Invert TA7FF Note: The values of bits 4 to 7 of TA7FFCR are undefined when read. 01 Set TA7FF to "1" 10 Clear TA7FF to "0" 11 Don't care
Figure 3.7.9(4)
8-bit timer register(TA7FFCR)
92CM27-154
2005-04-20
TMP92CM27
Timer Register (TA0REG to TA7REG) Symbol
TA0REG
Address
1102H
7
6
5
4
- W Undefined -
3
2
1
0
TA1REG
1103H
W Undefined -
TA2REG
110AH
W Undefined -
TA3REG
110BH
W Undefined -
TA4REG
1112H
W Undefined -
TA5REG
1113H
W Undefined -
TA6REG
111AH
W Undefined -
TA7REG
111BH
W Undefined
Note: Read-modify-write instruction is prohibited for above registers.
Figure 3.7.10
8-bit timer register(TA0REG to TA7REG)
92CM27-155
2005-04-20
TMP92CM27
3.7.4
Operation in Each Mode
(1) 8-bit timer mode Both TMRA0 and TMRA1 can be used independently as 8-bit interval timers. When set function and count data, TMRA0 and TMRA1 should be stopped. 1. Generating interrupts at a fixed interval (using TMRA1) To generate interrupts at constant intervals using TMRA1 (INTTA1), first stop TMRA1 then set the operation mode, input clock and a cycle to TA01MOD and TA1REG register, respectively. Then, enable the interrupt INTTA1 and start TMRA1 counting. Example: To generate an INTTA1 interrupt every 40 s at fc = 40 MHz, set each register as follows:
MSB 7 - 0 LSB 10 0- -- 0 - 1 0 - -
TA01RUN TA01MOD
6 X 0
5 X X
4 X X
3 - 0 1 - -
2 - 1 0 - 1
Stop TMRA1 and clear it to 0. Select 8-bit timer mode and select T1 (0.2 s at fc = 40 MHz) as the input clock. Set 40 s / T1 = 200 = C8H to TAREG. Enable INTTA1 and set it to Level 5. Start TMRA1 counting.
TA1REG 1 1 0 0 INTETA01 X 1 0 1 TA01RUN - X X X X : Don't care, - : No change
Note:
The input clocks for TMRA0 and TMRA1 differ as follows: TMRA0: Uses TMRA0 input (TA0IN) and can be selected from T1, T4, or T16. TMRA1: Match output of TMRA0 (TA0TRG) and can be selected from T1, T16, T256.
92CM27-156
2005-04-20
TMP92CM27
2. Generating a 50% duty ratio square wave pulse The state of the timer flip-flop (TA1FF) is inverted at constant intervals and its status output via the timer output pin (TA1OUT). Example: To output a 1.2 s square wave pulse from the TA1OUT pin at fSYS = 20 MHz, use the following procedure to make the appropriate register settings. This example uses TMRA1; however, either TMRA0 or TMRA1 may be used.
TA01RUN TA01MOD TA1REG TA1FFCR PFCR PFFC TA01RUN
MSB 7 - 0 0 X X X -
6 X 0 0 X - - X
5 X X 0 X - - X
4 X X 0 X - - X
3 - 0 0 1 - - -
2 - 1 0 0 - - 1
LSB 10 0- -- 1 1 1 1 1 1 1 - - -
Stop TMRA1 and clear it to 0. Select 8-bit timer mode and select T1 (0.2 s at fc = 40 MHz) as the input clock. Set the timer register to 1.2 s / T1 / 2 = 3. Clear TA1FF to 0 and set it to invert on the match detect signal from TMRA1. Set PF1 to function as the TA1OUT pin Start TMRA1 counting.
X : Don't care, - : No change
T1 TA01RUN Bit7 to 2 Up counter Bit1 Bit0 Comparator timing Comparator output (Match detect) INTTA1 Up counter clear 0 1 2 3 0 1 2 3 0 1 2 3 0
TA1FF TA1OUT 0.6 s at fc = 40 MHz
Figure 3.7.11
Square Wave Output Timing Chart (50% duty)
92CM27-157
2005-04-20
TMP92CM27
3. Making TMRA1 count up on the match signal from the TMRA0 comparator Select 8-bit timer mode and set the comparator output from TMRA0 to be the input clock to TMRA1.
Comparator
(Match output for TMRA0)
TMRA0 up counter (when TA0REG = 5)
TMRA1 up counter (when TA1REG ( 2) Match output for TMRA1
1
2
3 1
4
5
1
2
3 2
4
5
1
2 1
3
Figure 3.7.12 (2) 16-bit timer mode
TMRA1 Count up on Signal from TMRA0
A 16-bit interval timer is configured by pairing the two 8-bit timers TMRA0 and TMRA1. To make a 16-bit interval timer, in which TMRA0 and TMRA1 are cascaded together, set TA01MOD to "01". In 16-bit timer mode, the overflow output from TMRA0 is used as the input clock for TMRA1, regardless of the value set in TA01MOD Table 3.7.2 shows the relationship between the timer (Interrupt) cycle and the input clock selection. To set the timer interrupt interval, set the lower eight bits in timer register TA0REG and the upper eight bits in TA1REG. Be sure to set TA0REG first (As entering data in TA0REG temporarily disables the compare, while entering data in TA1REG starts the compare). Example: To generate an INTTA1 interrupt every 0.2 s at fc = 40 MHz, set the timer registers TA0REG and TA1REG as follows: If T16 (3.2 s at 40 MHz) is used as the input clock for counting, set the following value in the registers: 0.2 s / 3.2 s = 62500 = F424H; e.g., set TA1REG to F4H and TA0REG to 24H.
92CM27-158
2005-04-20
TMP92CM27
The comparator match signal is output from TMRA0 each time the up-counter UC0 matches TA0REG, though the up-counter UC0 is not be cleared. In the case of the TMRA1 comparator, the match detect signal is output on each comparator pulse on which the values in the up-counter UC1 and TA1REG match. When the match detect signal is output simultaneously from both the comparator TMRA0 and TMRA1, the up-counters UC0 and UC1 are cleared to "0" and the interrupt INTTA1 is generated. Also, if inversion is enabled, the value of the timer flip-flop TA1FF is inverted.
Example: When TA1REG = 04H and TA0REG = 80H
Value of up counter 0000H (UC1 and UC0) TMRA0 comparator match detect signal Interrupt INTTA1 Timer output TA1OUT Inversion 0080H 0180H 0280H 0380H 0480H
Figure 3.7.14
Timer Output by 16-Bit Timer Mode
(3) 8-bit PPG (Programmable pulse generation) output mode Square wave pulses can be generated at any frequency and duty ratio by TMRA0. The output pulses may be active-low or active-high. In this mode TMRA1 cannot be used. TMRA0 outputs pulses on the TA1OUT pin (Shared with PF1).
tH When = "10" t
tL
tL When = "01" t
tH
Example: When = "01" TA0REG and UC0 match (Generate INTTA0) TA1REG and UC0 match (Generate INTTA1) TA1OUT TA0REG TA1REG
Figure 3.7.15
8-Bit PPG Output Waveforms
92CM27-159
2005-04-20
TMP92CM27
In this mode, a programmable square wave is generated by inverting the timer output each time the 8-bit up-counter (UC0) matches the value in one of the timer registers TA0REG or TA1REG. The value set in TA0REG must be smaller than the value set in TA1REG. Although the up-counter for TMRA1 (UC1) is not used in this mode, TA01RUN should be set to "1", so that UC1 is set for counting. Figure 3.7.16 shows a block diagram representing this mode.
TA1OUT TA1FFCR
TA01RUN TA0IN T1 T4 T16 Selector 8-bit up counter (UC0)
TA1FF
TA01MOD
Inversion INTTA0
Comparator
Comparator
INTTA1
Selector
TA0REG Shift trigger
TA0REG-WR TA01RUN Register buffer TA1REG
Internal data bus
Figure 3.7.16
Block Diagram of 8-Bit PPG Output Mode
If the TA0REG double buffer is enabled in this mode, the value of the register buffer will be shifted into TA0REG each time TA1REG matches UC0. Use of the double buffer facilitates the handling of low-duty waves (when duty is varied).
Match with TA0REG and UC0 Match with TA1REG
(Up counter = Q1)
(Up counter = Q2) Shift into register buffer Q2 Q2 Q3 Write TA0REG (Register buffer)
TA0REG (Value of compare) Register buffer
Q1
Figure 3.7.17
Operation of Register Buffer0
92CM27-160
2005-04-20
TMP92CM27
Example: To generate 1/4 duty 62.5 kHz pulses (at fc = 40 MHz):
16 s
Calculate the value that should be set in the timer register. To obtain a frequency of 62.5 kHz, the pulse cycle t should be: t = 1/62.5 kHz = 16 s T1 = 0.2 s (at fc = 40 MHz); 16 s/0.2 s = 80 Therefore set TA1REG = 80 = 50H The duty is to be set to 1/4: t x 1/4 = 16 s x 1/4 = 4 s 4 s/0.2 s = 20 Therefore, set TA0REG = 20 = 14H
TA01RUN TA01MOD TA0REG TA1REG TA1FFCR PFCR PFFC TA01RUN

7 0 1 0 0 X
6 X 0 0 1 X
5 X X 0 0 X
4 X X 1 1 X
3 - X 0 0 0
2 0 X 1 0 1
1 0 0 0 0 1
0 0 1 0 0 X 1 1 1
Stop TMRA0 and TMRA1 and clear it to "0". Set the 8-bit PPG mode, and select T1 as input clock. Write 14H. Write 50H. Set TA1FF and set inversion to enable. Writing "10" provides negative logic pulse. Set PF1 to TA1OUT pin. Start TMRA0 and TMRA1 counting.
X X 1
- - X
- - X
- - X
- - -
- - 1
- - 1
X : Don't care, - : No change
92CM27-161
2005-04-20
TMP92CM27
(4) 8-bit PWM (Pulse width modulation) output mode This mode is only valid for TMRA0. In this mode, a PWM pulse with the maximum resolution of 8 bits can be output. When TMRA0 is used the PWM pulse is output on the TA1OUT pin (which is also used as PF1). TMRA1 can also be used as an 8-bit timer. The timer output is inverted when the up-counter (UC0) matches the value set in the timer register TA0REG or when 2n counter overflow occurs (n = 6, 7, or 8 as specified by TA01MOD ). The up-counter UC0 is cleared when 2n counter overflow occurs. The following conditions must be satisfied before this PWM mode can be used. Value set in TA0REG < Value of set for 2n counter overflow Value set in TA0REG 0
Match with TA0REG and UC0 2n overflow (Interrupt INTTA0)
TA1OUT tPWM (PWM cycle)
Figure 3.7.18
8-Bit Output Wave Form
Figure 3.7.19 shows a block diagram representing this mode.
TA1OUT TA1FFCR
TA01RUN TA0IN T1 T4 T16 Selector
8-bit up counter
(UC0)
Clear
TA1FF Inversion
TA01MOD
2n overflow control Overflow
TA01MOD
Comparator
INTTA0 TA0REG Selector TA0REG-WR TA01RUN Register buffer Shift trigger
Internal data bus
Figure 3.7.19
Block Diagram of 8-Bit PWM Output Mode
92CM27-162
2005-04-20
TMP92CM27
In this mode, the value of the register buffer will be shifted into TA0REG if 2n overflow is detected when the TA0REG double buffer is enabled. Use of the double buffer facilitates the handling of low duty ratio waves.
Match with TA0REG Up counter = Q1 2
n
Up counter = Q2 Shift from TA0REG (Register buffer)
overflow Q1 Q2 Q2 Q3 Write to TA0REG
TA0REG (Value of compare) Register buffer
Figure 3.7.20
Operation of Register Buffer
Example: To output the following PWM waves on the TA1OUT pin at fc = 40 MHz:
18.0 s 25.6 s
To achieve a 25.6 s PWM cycle by setting T1 to 0.2 s (at fc = 40 MHz): 25.6 s/0.2 s = 128 = 2n Therefore n should be set to 7. Since the low-level period is 18.0 s when T1 = 0.2 s, set the following value for TA0REG: 18.0 s/0.2 s = 90 = 5AH
TA01RUN TA01MOD TA0REG TA1FFCR PFCR PFFC TA01RUN
MSB 7 - 1
6 X 1 1 X
5 X 1 0 X
4 X 0 1 X - - X
3
2
-- --
1 1 0 0 - - 1
LSB 10 -0 01 1 1 - - - 0 X 1 1 1
Stop TMRA0 and clear it to 0. Select 8-bit PWM mode (cycle: 27) and select T1 as the input clock. Write 5AH. Clear TA1FF to 0; set inversion to enable. Set PF1 to TA1OUT pin. Start TMRA0 counting.

0 X X X 1
--
- X - X
- - -
X : Don't care, - : No change
92CM27-163
2005-04-20
TMP92CM27
Table 3.7.3
System clock selection Clock gear value 000 (fc) 001 (fc/2) 0 (fsys) 010 (fc/4) 011 (fc/8) 100 (fc/16) XXX: Don't care
Relationship of PWM Cycle and 2 Counter
@fc = 40 MHz PWM Cycle 26 27 28
n
T1
12.8s 25.6s 51.2s 102.4s 204.8s
T4
51.2s 102.4s 204.8s 409.6s 819.2s
T16
204.8s 409.6s 819.2s 1.63ms 3.27ms
T1
25.6s 51.2s 102.4s 204.8s 409.6s
T4
102.4s 204.8s 409.6s 819.2s 1.63ms
T16
409.6s 819.2s 1.63ms 3.27ms 6.55ms
T1
51.2s 102.4s 204.8s 409.6s 819.2s
T4
204.8s 409.6s 819.2s 1.63ms 3.27ms
T16
819.2s 1.63ms 3.27ms 6.55ms 13.1ms
(5) Mode settings Table 3.7.4 shows the SFR settings for each mode. Table 3.7.4
Register Name Function Timer mode PWM cycle
Timer Mode Setting Registers
TA01MOD Upper timer input clock Lower timer match, T1, T16, T256 (00, 01, 10, 11) Lower timer input clock External, T1, T4, T16 (00, 01, 10, 11) External, T1, T4, T16 (00, 01, 10, 11) External, T1, T4, T16 (00, 01, 10, 11) External, T1, T4, T16 (00, 01, 10, 11) TA1FFCR Timer F/F Inversion Signal select 0: Lower timer output 1: Upper timer output
8-bit timer x 2 channels
00
-
16-bit timer mode
01
-
-
-
8-bit PPG x 1 channel
10
-
26, 27, 28 (01, 10, 11)
-
-
8-bit PWM x 1 channel 8-bit timer x 1 channel
11
- T1, T16, T256 (01, 10, 11)
-
11
-
-
Output disable
- : Don't care
92CM27-164
2005-04-20
TMP92CM27
3.8
16-Bit Timer/Event Counters (TMRB)
The TMP92CM27 contains 6 channels 16-bit timer/event counter (TMRB0 to TMRB5) which have the following operation modes: * * * 16-bit interval timer mode 16-bit event counter mode 16-bit programmable square wave pulse generation output mode (PPG: Variable duty cycle with variable period)
Can be used following operation modes by capture function: * Frequency measurement mode * * Pulse width measurement mode Time differential measurement mode
Figure 3.8.1 to Figure 3.8.2 show block diagram of TMRB0 to TMRB5. Each timer/event counter consists of a 16-bit up counter, two 16-bit timer registers (One of them with a double-buffer structure), two 16-bit capture registers, two comparators, a capture input controller, a timer flip-flop and a control circuit. Each timer/event counter is controlled by 11-byte control register (SFR). Each of the six modules (TMRB0 to TMRB5) can be operated independently. All modules operate in the same manner; hence only the operation of TMRA01 is explained here. Table 3.8.1 Pins and SFR of TMRB
Channel Spec External pin External clock/ Capture trigger input pin Timer flip-flop output pin Timer run register Timer mode register Timer flip-flop control register TMRB0 TB0IN0 TB0IN1 TB0OUT0 TB0OUT1 TB0RUN TB0MOD TB0FFCR TB0RG0L SFR Timer register TB0RG0H TB0RG1L TB0RG1H TB0CP0L Capture register TB0CP0H TB0CP1L TB0CP1H External signal Interrupt Capture trigger input signal Timer interrupt Timer overflow interrupt TA1OUT INTTB00 INTTB01 INTTBOF0 TMRB1 TB1IN0 TB1IN1 TB1OUT0 TB1OUT1 TB1RUN TB1MOD TB1FFCR TB1RG0L TB1RG0H TB1RG1L TB1RG1H TB1CP0L TB1CP0H TB1CP1L TB1CP1H TA1OUT INTTB10 INTTB11 INTTBOF1 TMRB2 TB2IN0 TB2IN1 TB2OUT0 TB2OUT1 TB2RUN TB2MOD TB2FFCR TB2RG0L TB2RG0H TB2RG1L TB2RG1H TB2CP0L TB2CP0H TB2CP1L TB2CP1H TA3OUT INTTB20 INTTB21 INTTBOF2 TMRB3 TB3IN0 TB3IN1 TB3OUT0 TB3OUT1 TB3RUN TB3MOD TB3FFCR TB3RG0L TB3RG0H TB3RG1L TB3RG1H TB3CP0L TB3CP0H TB3CP1L TB3CP1H TA3OUT INTTB30 INTTB31 INTTBOF3 TMRB4 None TB4OUT0 TB4OUT1 TB4RUN TB4MOD TB4FFCR TB4RG0L TB4RG0H TB4RG1L TB4RG1H TB4CP0L TB4CP0H TB4CP1L TB4CP1H TA5OUT INTTB40 INTTB41 INTTBOF4 TMRB5 None TB5OUT0 TB5OUT1 TB5RUN TB5MOD TB5FFCR TB5RG0L TB5RG0H TB5RG1L TB5RG1H TB5CP0L TB5CP0H TB5CP1L TB5CP1H TA5OUT INTTB50 INTTB51 INTTBOF5
Note 1) Since TB2OUT0/TB4OUT0, TB2OUT1/TB4OUT1, TB3OUT0/TB5OUT0, and TB3OUT1/TB5OUT1 are making the output terminal serve a double purpose, they cannot be used simultaneously. Note 2) Since INTTB30/INTTB31,INTTB40/INTTB41 and INTTB50/INTTB51 are making the interruption factor serve a double purpose, they cannot be used simultaneously. Note 3) Although INTTBOF0/INTTBOF1/INTTBOF2/INTTBOF3/INTTBOF4/INTTBOF5 is making the interruption factor serve a double purpose, it can be used simultaneously. Which interruption occurred should lead an INTST register.
92CM27-165
2005-04-20
TMP92CM27
This chapter consists of the following items: 3.8.1 Block diagram 3.8.2 Operation 3.8.3 SFRs 3.8.4 Operation in Each Mode
92CM27-166
2005-04-20
Interrupt output
3.8.1
Internal data bus Register 0 INTTB00 Register 1 INTTB01
Internal data bus
Run/ clear 2 T1 Capture register 0 TB0CP0H/L Caputure register 1 TB0CP1H/L Timer flip-flop TB0FF0 Timer flip-flop control TB0FF1 T4 T16 4 8 16 32 TB0RUN
Prescaler clock: T0
PG0 Shift trigger
Block Diagram
External interrupt input TB0MOD Capture, external interrupt control Selector TB0MOD Count clock 16-bit up counter (UC0) T1 T4 T16 TB0RUN TB0MOD
Timer flip-flop output TB0OUT0 TB0OUT1
INT4 INT5 (from TMRA01) TA1OUT TB0IN0 TB0IN1
Figure 3.8.1 Block Diagram of TMRB0
92CM27-167
TB0MOD 16-bit comparator (CP0) Match detection 16-bit timer register TB0REG0H/L TB0RUN Register buffer 0 Internal data bus
Overflow interrupt INTTBOF0
Match detection
16-bit comparator (CP1)
16-bit timer register TB0RG1H/L
TMP92CM27
2005-04-20
Intenal data bus
Interrupt output Internal data bus Register 0 INTTB10 Register 1 INTTB11 Internal data bus
Run/ clear 2 T1 Capture register 0 TB1CP0H/L Caputure register 1 TB1CP1H/L Timer flip-flop TB1FF0 Timer flip-flop control TB1FF1 T4 T16 4 8 16 32 TB1RUN
Prescaler clock: T0
PG1 Shift trigger
External interrupt input TB1MOD Capture, external interrupt control Selector TB1MOD Count clock 16-bit up counter (UC1) T1 T4 T16 TB1RUN TB1MOD
Timer flip-flop output TB1OUT0 TB1OUT1
INT6 INT7 (from TMRA01) TA1OUT TB1IN0 TB1IN1
Figure 3.8.2 Block Diagram of TMRB1
TB1MOD 16-bit comparator (CP0) Match detection 16-bit comparator (CP1) 16-bit timer register TB1REG0H/L 16-bit timer register TB1RG1H/L TB1RUN Register buffer 1 Internal data bus Intenal data bus
92CM27-168
Overflow interrupt INTTBOF1
Match detection
TMP92CM27
2005-04-20
Interrupt output Internal data bus Register 0 INTTB20 Register 1 INTTB21 Internal data bus
Run/ clear 2 T1 Capture register 0 TB2CP0H/L Caputure register 1 TB2CP1H/L Timer flip-flop TB2FF0 Timer flip-flop control TB2FF1 T4 T16 4 8 16 32 TB2RUN
Prescaler clock: T0
External interrupt input TB2MOD Capture, external interrupt control Selector TB2MOD Count clock 16-bit up counter (UC2) T1 T4 T16 TB2RUN TB2MOD
Timer flip-flop output TB2OUT0 TB2OUT1
INT8 INT9 (from TMRA23) TA3OUT TB2IN0 TB2IN1
Figure 3.8.3 Block Diagram of TMRB2
TB2MOD 16-bit comparator (CP0) Match detection 16-bit comparator (CP1) 16-bit timer register TB2REG0H/L 16-bit timer register TB2RG1H/L TB2RUN Register buffer 2 Internal data bus Intenal data bus
92CM27-169
Overflow interrupt INTTBOF2
Match detection
TMP92CM27
2005-04-20
Interrupt output Internal data bus Register 0 INTTB30 Register 1 INTTB31 Internal data bus
Run/ clear 2 T1 Capture register 0 TB3CP0H/L Caputure register 1 TB3CP1H/L Timer flip-flop TB3FF0 Timer flip-flop control TB3FF1 T4 T16 4 8 16 32 TB3RUN
Prescaler clock: T0
External interrupt input TB3MOD Capture, external interrupt control Selector TB3MOD Count clock 16-bit up counter (UC3) T1 T4 T16 TB3RUN TB3MOD
Timer flip-flop output TB3OUT0 TB3OUT1
INTA INTB (from TMRA23) TA1OUT TB3IN0 TB3IN1
Figure 3.8.4 Block Diagram of TMRB3
TB3MOD 16-bit comparator (CP0) Match detection 16-bit comparator (CP1) 16-bit timer register TB3REG0H/L 16-bit timer register TB3RG1H/L TB3RUN Register buffer 3 Internal data bus Intenal data bus
92CM27-170
Overflow interrupt INTTBOF3
Match detection
TMP92CM27
2005-04-20
Interrupt output Internal data bus Register 0 INTTB40 Register 1 INTTB41 Internal data bus
Run/ clear 2 T1 Capture register 0 TB4CP0H/L Caputure register 1 TB4CP1H/L Timer flip-flop TB4FF0 Timer flip-flop control TB4FF1 T4 T16 4 8 16 32 TB4RUN
Prescaler clock: T0
(from TMRA45) TA5OUT Capture, external interrupt control Selector TB4MOD Count clock 16-bit up counter (UC4) T1 T4 T16 TB4RUN TB4MOD
TB4MOD
Timer flip-flop output TB4OUT0 TB4OUT1
Figure 3.8.5 Block Diagram of TMRB4
TB4MOD 16-bit comparator (CP0) Match detection 16-bit comparator (CP1) 16-bit timer register TB4REG0H/L 16-bit timer register TB4RG1H/L TB4RUN Register buffer 4 Internal data bus Intenal data bus
92CM27-171
Overflow interrupt INTTBOF4
Match detection
TMP92CM27
2005-04-20
Interrupt output Internal data bus Register 0 INTTB50 Register 1 INTTB51 Internal data bus
Run/ clear 2 T1 Capture register 0 TB5CP0H/L Caputure register 1 TB5CP1H/L Timer flip-flop TB5FF0 Timer flip-flop control TB5FF1 T4 T16 4 8 16 32 TB5RUN
Prescaler clock: T0
(from TMRA45) TA5OUT Capture, external interrupt control Selector TB5MOD Count clock 16-bit up counter (UC5) T1 T4 T16 TB5RUN TB5MOD
TB5MOD
Timer flip-flop output TB5OUT0 TB5OUT1
Figure 3.8.6 Block Diagram of TMRB5
TB5MOD 16-bit comparator (CP0) Match detection 16-bit comparator (CP1) 16-bit timer register TB5REG0H/L 16-bit timer register TB5RG1H/L TB5RUN Register buffer 5 Internal data bus Intenal data bus
92CM27-172
Overflow interrupt INTTBOF5
Match detection
TMP92CM27
2005-04-20
TMP92CM27
3.8.2
Operation
(1) Prescaler The 5-bit prescaler generates the source clock for TMRB1. Input clock T0 to Priscara is a clock that was four dividing fFPH. This prescaler can be started or stopped using TB0RUN. Counting starts when is set to 1; the prescaler is cleared to zero and stops operation when is cleared to 0. Table 3.8.2 show prescaler output clock resolution. Table 3.8.2 Prescaler Output Clock Resolution
at fc = 40 MHz
Gear Value
SYSCR1 000 (fc) 001 (fc/2) 010 (fc/4) 011 (fc/8) 100 (fc/16) xxx: Don't care
3
Cycle T1 2 /fc (0.2 s) 24/fc (0.4 s) 2 /fc (0.8 s) 2 /fc (1.6 s) 2 /fc (3.2 s)
7 6 5 5
T4 2 /fc (0.8 s) 26/fc (1.6 s) 2 /fc (3.2 s) 2 /fc (6.4 s) 2 /fc (12.8 s)
9 8 7 7
T16 2 /fc (3.2 s) 28/fc (6.4 s) 29/fc (12.8 s) 210/fc (25.6 s) 211/fc (51.2 s)
(2) Up counter (UC0) UC0 is a 16-bit binary counter that counts up according to input from the clock specified by TB0MOD register. As the input clock, one of the prescaler internal clocks T1, T4, and T16 can be selected. Counting or stopping and clearing of the counter is controlled by timer operation control register TB0RUN. And an external clock from TB0IN0 pin can be selected in TB0MOD. When clearing is enabled, the up counter UC0 will be cleared to zero each time its value matches the value in the timer register TB0RG1H/L. Clearing can be enabled or disabled using TB0MOD. If clearing is disabled, the counter operates as a free-running counter. A timer overflow interrupt (INTTBO0) is generated when UC0 overflow occurs.
92CM27-173
2005-04-20
TMP92CM27
(3) Timer registers (TB0RG0H/L and TB0RG1H/L) These two 16-bit registers are used to set the interval time. When the value in the up counter UC0 matches the value set in this timer register, the comparator match detect signal will go active. Setting data for both upper and lower timer registers TB0RG0H/L and TB0RG1H/L is always needed. For example, either using 2-byte data transfer instruction or using 1-byte data transfer instruction twice for lower 8 bits and upper 8 bits in order. The TB0RG0H/L timer register has a double-buffer structure, which is paired with register buffer 0. The value set in TB0RUN determines whether the double-buffer structure is enabled or disabled: It is disabled when = 0, and enabled when = 1. When the double buffer is enabled, data is transferred from the register buffer to the timer register when the values in the up counter (UC0) and the timer register TB0RG1 match. After a reset, TB0RG0H/L and TB0RG1H/L are undefined. If the 16-bit timer is to be used after a reset, data should be written to it beforehand. On a reset is initialized to 0, disabling the double buffer. To use the double buffer, write data to the timer register, set to 1, then write data to the register buffer as shown below. TB0RG0H/L and the register buffer both have the same memory addresses (001189H and 001188H) allocated to them. If = 0, the value is written to both the timer register and the register buffer. If = 1, the value is written to the register buffer only.
92CM27-174
2005-04-20
TMP92CM27
The addresses of the timer registers are as follows:
TMRB0 TB0RG0H/L Upper 8 bits (TB0RG0H) 1189H Lower 8 bits (TB0RG0L) 1188H TB0RG1H/L Upper 8 bits (TB0RG1H) 118BH Lower 8 bits (TB0RG1L) 118AH
TMRB1 TB1RG0H/L Upper 8 bits (TB1RG0H) 1199H Lower 8 bits (TB1RG0L) 1198H TB1RG1H/L Upper 8 bits (TB1RG1H) 119BH Lower 8 bits (TB1RG1L) 119AH
TMRB2 TB2RG0H/L Upper 8 bits (TB2RG0H) 11A9H Lower 8 bits (TB2RG0L) 11A8H TB2RG1H/L Upper 8 bits (TB2RG1H) 11ABH Lower 8 bits (TB2RG1L) 11AAH
TMRB3 TB3RG0H/L Upper 8 bits (TB3RG0H) 11B9H Lower 8 bits (TB3RG0L) 11B8H TB3RG1H/L Upper 8 bits (TB3RG1H) 11BBH Lower 8 bits (TB3RG1L) 11BAH
TMRB4 TB4RG0H/L Upper 8 bits (TB4RG0H) 11C9H Lower 8 bits (TB4RG0L) 11C8H TB4RG1H/L Upper 8 bits (TB4RG1H) 11CBH Lower 8 bits (TB4RG1L) 11CAH
TMRB5 TB5RG0H/L Upper 8 bits (TB5RG0H) 11D9H Lower 8 bits (TB5RG0L) 11D8H TB5RG1H/L Upper 8 bits (TB5RG1H) 11DBH Lower 8 bits (TB5RG1L) 11DAH
The timer registers are write-only registers and thus cannot be read.
92CM27-175
2005-04-20
TMP92CM27
(4) Capture registers These 16-bit registers are used to latch the values in the up counters UC0. Data in the capture registers should be read both upper and lower all 16 bits. For example, using 2-byte data transfer instruction or using 1-byte data transfer instruction twice for lower 8 bits and upper 8 bits in order. The addresses of the capture registers are as follows:
TMRB0 TB0CP0H/L Upper 8 bits (TB0CP0H) 118DH Lower 8 bits (TB0CP0L) 118CH TB0CP1H/L Upper 8 bits (TB0CP1H) 118FH Lower 8 bits (TB0CP1L) 118EH
TMRB1 TB1CP0H/L Upper 8 bits (TB1CP0H) 119DH TMRB2 TB2CP0H/L Upper 8 bits (TB2CP0H) 11ADH TMRB3 TB3CP0H/L Upper 8 bits (TB3CP0H) 11BDH TMRB4 TB4CP0H/L Upper 8 bits (TB4CP0H) 11CDH TMRB5 TB5CP0H/L Upper 8 bits (TB5CP0H) 11DDH Lower 8 bits (TB5CP0L) 11DCH TB5CP1H/L Upper 8 bits (TB5CP1H) 11DFH Lower 8 bits (TB5CP1L) 11DEH Lower 8 bits (TB4CP0L) 11CCH TB4CP1H/L Upper 8 bits (TB4CP1H) 11CFH Lower 8 bits (TB4CP1L) 11CEH Lower 8 bits (TB3CP0L) 11BCH TB3CP1H/L Upper 8 bits (TB3CP1H) 11BFH Lower 8 bits (TB3CP1L) 11BEH Lower 8 bits (TB2CP0L) 11ACH TB2CP1H/L Upper 8 bits (TB2CP1H) 11AFH Lower 8 bits (TB2CP1L) 11AEH Lower 8 bits (TB1CP0L) 119CH TB1CP1H/L Upper 8 bits (TB1CP1H) 119FH Lower 8 bits (TB1CP1L) 119EH
The capture registers are read-only registers and thus cannot be written.
92CM27-176
2005-04-20
TMP92CM27
(5) Capture and external interrupt control This circuit controls the timing to latch the value of up counter UC0 into TB0CP0H/L, TB0CP1H/L and generating for external interrupt. Interrupt timing of capture register and selection edge of external interrupt are set by TB0MOD. (TMRB4 and TMRB5 does not include the selection edge of external interrupt.) External interrupt INT5 is fixed to the rising edge. The value in the up counter (UC0) can be loaded into a capture register by software. Whenever 0 is programmed to TB0MOD, the current value in the up counter is loaded into capture register TB0CP0H/L. It is necessary to keep the prescaler in Run mode (e.g., TB0RUN must be held at a value of 1). Note) External interrupt can be controlled with this control circuit by seeing when the port setting is set to input function (TB0IN0) of TMRB0. When the port setting is set to INT4, it controls by interrupt input mode control 1 and 2(IIMC1,IIMC2). (6) Comparators (CP0 and CP1) CP0 and CP1 are 16-bit comparators which compare the value in the up counter UC0 with the value set in TB0RG0H/L or TB0RG1H/L respectively, in order to detect a match. If a match is detected, the comparator generates an interrupt (INTTB00 or INTTB01 respectively). (7) Timer flip-flop (TB0FF0 and TB0FF1) These flip-flops (TB0FF0 and TB0FF1) are inverted by the match detect signals from the comparators and the latch signals to the capture registers. Inversion can be enabled and disabled for each element using TB0FFCR. Moreover, control of TB0FF0 and TB0FF1 is controllable by TB0MOD. After a reset the values of TB0FF0 and TB0FF1 are undefined. If "00" is programmed to TB0FFCR or , TB0FF0 will be inverted. If "01" is programmed to the capture registers, the value of TB0FF0 will be set to "1". If "10" is programmed to the capture registers, the value of TB0FF0 will be cleared to "0". The values of TB0FF0 and TB0FF1 can be output via the timer output pins TB0OUT0 (which is shared with PJ0), TB0OUT1 (which is shard with PJ1). Because the timer output terminal of TMRB2/TMRB3 and TMRB4/TMRB5 uses the terminal combinedly, it is not possible to use it at the same time. Timer output should be specified using the port function register.
92CM27-177
2005-04-20
TMP92CM27
3.8.3
SFRs
TMRB0 Run Register 7 6
- R/W 0 Always write "0".
5
4
3
I2TB0 R/W 0 IDLE2 0: Stop 1: Operate
2
TB0PRUN R/W 0 Operation of prescaler 0: Stop and clear 1: Run (Count)
1
0
TB0RUN R/W 0 Operation of Up counter
TB0RUN (1180H)
Bit symbol Read/Write After reset
TB0RDE R/W 0 Double buffer 0: Disable 1: Enable
Function
Up counter operation for TMRB0 0 1 Control of double buffer 0 1 Disable Enable Control at the time of the IDLE2 mode 0 1 Stop Operate Stop & Clear Count
Prescaler operation for TMRB0 0 1 Stop & Clear Count
Note: The values of bits 1, 4 and 5 of TB0RUN are undefined when read
TMRB1 Run Register 7
TB1RUN (1190H) Bit symbol Read/Write After reset TB1RDE R/W 0 Double buffer 0: Disable 1: Enable
6
- R/W 0 Always write "0".
5
4
3
I2TB1 R/W 0 IDLE2 0: Stop 1: Operate
2
TB1PRUN R/W 0 Operation of prescaler 0: Stop and clear 1: Run (Count)
1
0
TB1RUN R/W 0 Operation of Up counter
Function
Up counter operation for TMRB1 0 1 Control of double buffer 0 1 Disable Enable Control at the time of The IDLE2 mode 0 1 Stop Operate Stop & Clear Count operationfor TMRB1
Prescaler 0 1
Stop & Clear Count
Note: The values of bits 1, 4 and 5 of TB1RUN are undefined when read
Figure 3.8.7 Register for TMRB (1)
92CM27-178
2005-04-20
TMP92CM27
TMRB2 Run Register 7
TB2RUN (11A0H) Bit symbol Read/Write After reset TB2RDE R/W 0 Double buffer 0: Disable 1: Enable
6
- R/W 0 Always write "0".
5
4
3
I2TB2 R/W 0 IDLE2 0: Stop 1: Operate
2
TB2PRUN R/W 0 Operation of prescaler 0: Stop and clear 1: Run (Count)
1
0
TB2RUN R/W 0 Operation of Up counter
Function
Up counter operation for TMRB2 0 1 Control of double buffer 0 1 Disable Enable Control at the time of the IDLE2 mode 0 1 Stop Operate Stop & Clear Count
Prescaler operation for TMRB2 0 1 Stop & Clear Count
Note: The values of bits 1, 4 and 5 of TB2RUN are undefined when read
TMRB3 Run Register 7
TB3RUN (11B0H) Bit symbol Read/Write After reset TB3RDE R/W 0 Double buffer 0: Disable 1: Enable
6
- R/W 0 Always write "0".
5
4
3
I2TB3 R/W 0 IDLE2 0: Stop 1: Operate
2
TB3PRUN R/W 0 Operation of prescaler 0: Stop and clear 1: Run (Count)
1
0
TB3RUN R/W 0 Operation of Up counter
Function
Up counter operation for TMRB3 0 1 Control of double buffer 0 1 Disable Enable Control at the time of The IDLE2 mode 0 1 Stop Operate Stop & Clear Count operationfor TMRB3
Prescaler 0 1
Stop & Clear Count
Note: The values of bits 1, 4 and 5 of TB3RUN are undefined when read
Figure 3.8.8 Register for TMRB (2)
92CM27-179
2005-04-20
TMP92CM27
TMRB4 Run Register 7
TB4RUN (11C0H) Bit symbol Read/Write After reset TB4RDE R/W 0 Double buffer 0: Disable 1: Enable
6
- R/W 0 Always write "0".
5
4
3
I2TB4 R/W 0 IDLE2 0: Stop 1: Operate
2
TB4PRUN R/W 0 Operation of prescaler 0: Stop and clear 1: Run (Count)
1
0
TB4RUN R/W 0 Operation of Up counter
Function
Up counter operation for TMRB4 0 1 Control of double buffer 0 1 Disable Enable Control at the time of the IDLE2 mode 0 1 Stop Oparate Stop & Clear Count
Prescaler operation for TMRB4 0 1 Stop & Clear Count
Note: The values of bits 1, 4 and 5 of TB4RUN are undefined when read
TMRB5 Run Register 7
TB5RUN (11D0H) Bit symbol Read/Write After reset TB5RDE R/W 0 Double buffer 0: Disable 1: Enable
6
- R/W 0 Always write "0".
5
4
3
I2TB5 R/W 0 IDLE2 0: Stop 1: Operate
2
TB5PRUN R/W 0 Operation of prescaler 0: Stop and clear 1: Run (Count)
1
0
TB5RUN R/W 0 Operation of Up counter
Function
Up counter operation for TMRB5 0 1 Control of double buffer 0 1 Disable Enable Control at the time of The IDLE2 mode 0 1 Stop Oparate Stop & Clear Count operationfor TMRB5
Prescaler 0 1
Stop & Clear Count
Note: The values of bits 1, 4 and 5 of TB5RUN are undefined when read
Figure 3.8.9 Register for TMRB (3)
92CM27-180
2005-04-20
TMP92CM27
TMRB0 Mode Register 7
TB0MOD (1182H) Bit symbol Read/Write After reset Read-modify Function -write instruction is prohibited 0 TB0CT1 R/W 0
6
TB0ET1
5
TB0CP0I W 1
4
TB0CPM1 0
3
TB0CPM0 0
2
TB0CLE R/W 0 Up counter control 0: disable 1: enable
1
TB0CLK1 0
0
TB0CLK0 0
TB0FF1 Inversion trigger Software capture 0: Trigger disable control 1: Trigger enable 0: Software Invert when Invert when capturer capture to match UC0 1: Undefined capture with register 1 TB0RG1H/L
Capture timing 00: Disable INT4 is rising edge 01: TB0N0 TB0IN1 INT4 is rising edge 10: TB0IN0 TB0IN0 INT4 is falling edge 11: TA1OUT TA1OUT INT4 is rising edge
TMRB0 source clock 00: TB0IN0 pin input 01: T1 10: T4 11: T16
Input clock 00 TB0IN0 pin input 01 10 11
T1 T4 T16
Clear up counter 0(UC0) 0 Clear disable 1 Clear by matching with TB0RG1H/L
Capture/interrupt timing Capture control 00 01 10 11 Capture disable TB0CP0H/L by TB0IN0 rising TB0CP1H/L by TB0IN1 rising TB0CP0H/L by TB0IN0 rising TB0CP1H/L by TB0IN0 falling INT4 control Generate INT4 by TB0IN0 rising Generate INT4 by TB0IN0 falling
TB0CP0H/L by TA1OUT rising Generate INT4 by TB0CP1H/L by TA1OUT falling TB0IN0 rising
Software capture 0 1 Capture value of up counter to TB0CP0H/L Undefined
Inversion trigger control of TB0FF1 when the UC0 match with TB0RG1H/L 0 1 Disable inversion Enable inversion
Inversion trigger of TB0FF1 when the UC0 value is loaded in to TB0CP1H/L 0 1 Disable inversion Enable inversion
Figure 3.8.10 Register for TMRB (4)
92CM27-181
2005-04-20
TMP92CM27
TMRB1 Mode Register 7
TB1MOD (1192H) Bit symbol Read/Write After reset Read-modify -write instruction is prohibited Function 0 0: Trigger disable 1: Trigger enable Invert when capture to capture register 1
Invert when match UC1 with TB1RG1H/L
6
TB1ET1 R/W 0
5
TB1CP0I W 1 Software capture control 0: Software capture 1: Undefined
4
TB1CPM1 0
3
TB1CPM0 0
2
TB1CLE R/W 0 Up counter control 0: disable 1: enable
1
TB1CLK1 0
0
TB1CLK0 0
TB1CT1
TB1FF1 Inversion trigger
Capture timing 00: Disable INT6 is rising edge 01: TB1N0 TB1IN1 INT6 is rising edge 10: TB1IN0 TB1IN0 INT6 is falling edge 11: TA1OUT TA1OUT INT6 is rising edge
TMRB1 source clock 00: TB1IN0 pin input 01: T1 10: T4 11: T16
Input clock 00 01 10 11 TB1IN0 pin input
T1 T4 T16
Clear up counter (UC1) 0 1 Clear disable Clear by matching with TB1RG1H/L
Capture/interrupt timing Capture control 00 01 10 11 Capture disable TB1CP0H/L by TB1IN0 rising TB1CP1H/L by TB1IN1 rising TB1CP0H/L by TB1IN0 rising TB1CP1H/L by TB1IN0 falling TB1CP0H/L by TA1OUT rising TB1CP1H/L by TA1OUT falling INT6 control Generate INT6 by TB1IN0 rising Generate INT6 by TB1IN0 falling Generate INT6 by TB1IN0 rising
Software capture 0 1 Capture value of up counter to TB1CP0H/L Undefined
Inversion trigger control of TB1FF1 when the UC1 match with TB1RG1H/L 0 1 Disable inversion Enable inversion
Inversion trigger of TB1FF1 when the UC1 value is loaded in to TB1CP1H/L 0 1 Disable inversion Enable inversion
Figure 3.8.11 Register for TMRB (5)
92CM27-182
2005-04-20
TMP92CM27
TMRB2 Mode Register 7
TB2MOD (11A2H) Bit symbol Read/Write After reset Read-modify -write instruction is prohibited Function 0 0: Trigger disable 1: Trigger enable Invert when capture to capture register 2
Invert when match UC2 with TB2RG1H/L
6
TB2ET1 R/W 0
5
TB2CP0I W 1 Software capture control 0: Software capture 1: Undefined
4
TB2CPM1 0
3
TB2CPM0 0
2
TB2CLE R/W 0 Up counter control 0: disable 1: enable
1
TB2CLK1 0
0
TB2CLK0 0
TB2CT1
TB2FF1 Inversion trigger
Capture timing 00: Disable INT8 is rising edge 01: TB2N0 TB2IN1 INT8 is rising edge 10: TB2IN0 TB2IN0 INT8 is falling edge 11: TA3OUT TA3OUT INT8 is rising edge
TMRB2 source clock 00: TB2IN0 pin input 01: T1 10: T4 11: T16
Input clock 00 01 10 11 TB2IN0 pin input
T1 T4 T16
Clear up counter (UC2) 0 1 Clear disable Clear by matching with TB2RG1H/L
Capture/interrupt timing Capture control 00 01 10 11 Capture disable TB2CP0H/L by TB2IN0 rising TB2CP1H/L by TB2IN1 rising TB2CP0H/L by TB2IN0 rising TB2CP1H/L by TB2IN0 falling INT8 control Generate INT8 by TB2IN0 rising Generate INT8 by TB2IN0 falling
TB2CP0H/L by TA3OUT rising Generate INT8 by TB2CP1H/L by TA3OUT falling TB2IN0 rising
Software capture 0 1 Capture value of up counter to TB2CP0H/L Undefined
Inversion trigger control of TB2FF1 when the UC2 match with TB2RG1H/L 0 1 Disable inversion Enable inversion
Inversion trigger of TB2FF1 when the UC2 value is loaded in to TB2CP1H/L 0 1 Disable inversion Enable inversion
Figure 3.8.12 Register for TMRB (6)
92CM27-183
2005-04-20
TMP92CM27
TMRB3 Mode Register 7
TB3MOD (11B2H) Bit symbol Read/Write After reset Read-modify -write instruction is prohibited Function 0 0: Trigger disable 1: Trigger enable Invert when capture to capture register 3
Invert when match UC3 with TB3RG1H/L
6
TB3ET1 R/W 0
5
TB3CP0I W 1 Software capture control 0: Software capture 1: Undefined
4
TB3CPM1 0
3
TB3CPM0 0
2
TB3CLE R/W 0 Up counter control 0: disable 1: enable
1
TB3CLK1 0
0
TB3CLK0 0
TB3CT1
TB3FF1 Inversion trigger
Capture timing 00: Disable INTA is rising edge 01: TB3N0 TB3IN1 INTA is rising edge 10: TB3IN0 TB3IN0 INTA is falling edge 11: TA3OUT TA3OUT INTA is rising edge
TMRB3 source clock 00: TB3IN0 pin input 01: T1 10: T4 11: T16
Input clock 00 01 10 11 TB3IN0 pin input
T1 T4 T16
Clear up counter (UC3) 0 1 Clear disable Clear by matching with TB3RG1H/L
Capture/interrupt timing Capture control 00 01 10 11 Capture disable TB3CP0H/L by TB3IN0 rising TB3CP1H/L by TB3IN1 rising TB3CP0H/L by TB3IN0 rising TB3CP1H/L by TB3IN0 falling INTA control Generate INTA by TB3IN0 rising Generate INTA by TB3IN0 falling
TB3CP0H/L by TA3OUT rising Generate INTA by TB3CP1H/L by TA3OUT falling TB3IN0 rising
Software capture 0 1 Capture value of up counter to TB3CP0H/L Undefined
Inversion trigger control of TB3FF1 when the UC3 match with TB3RG1H/L 0 1 Disable inversion Enable inversion
Inversion trigger of TB3FF1 when the UC3 value is loaded in to TB3CP1H/L 0 1 Disable inversion Enable inversion
Figure 3.8.13 Register for TMRB (7)
92CM27-184
2005-04-20
TMP92CM27
TMRB4 Mode Register 7
TB4MOD (11C2H) Bit symbol Read/Write After reset Read-modify -write instruction is prohibited Function 0 0: Trigger disable 1: Trigger enable Invert when capture to capture register 4
Invert when match UC4 with TB5RG1H/L
6
TB4ET1 R/W 0
5
TB4CP0I W 1 Software capture control 0: Software capture 1: Undefined
4
TB4CPM1 0 Capture timing 00: Disable 01: (Reserved) 10: (Reserved) 11: TA5OUT TA5OUT
3
TB4CPM0 0
2
TB4CLE R/W 0 Up counter control 0: disable 1: enable
1
TB4CLK1 0
0
TB4CLK0 0
TB4CT1
TB4FF1 Inversion trigger
TMRB4 source clock 00: (Reserved) 01: T1 10: T4 11: T16
Input clock 00 01 10 11 (Reserved)
T1 T4 T16
Clear up counter (UC4) 0 1 Clear disable Clear by matching with TB4RG1H/L
Capture/interrupt timing Capture control 00 01 10 11 Capture disable (Reserved) (Reserved) TB4CP0H/L by TA1OUT rising TB4CP1H/L by TA1OUT falling
Software capture 0 1 Capture value of up counter to TB4CP0H/L Undefined
Inversion trigger control of TB4FF1 when the UC4 match with TB4RG1H/L 0 1 Disable inversion Enable inversion
Inversion trigger of TB4FF1 when the UC4 value is loaded in to TB4CP1H/L 0 1 Disable inversion Enable inversion
Figure 3.8.14 Register for TMRB (8)
92CM27-185
2005-04-20
TMP92CM27
TMRB5 Mode Register 7
TB5MOD (11D2H) Bit symbol Read/Write After reset Read-modify -write instruction is prohibited Function 0 0: Trigger disable 1: Trigger enable Invert when capture to capture register 5
Invert when match UC5 with TB5RG1H/L
6
TB5ET1 R/W 0
5
TB5CP0I W 1 Software capture control 0: Software capture 1: Undefined
4
TB5CPM1 0 Capture timing 00: Disable 01: (Reserved) 10: (Reserved) 11: TA5OUT TA5OUT
3
TB5CPM0 0
2
TB5CLE R/W 0 Up counter control 0: disable 1: enable
1
TB5CLK1 0
0
TB5CLK0 0
TB5CT1
TB5FF1 Inversion trigger
TMRB5 source clock 00: (Reserved) 01: T1 10: T4 11: T16
Input clock 00 01 10 11 (Reserved)
T1 T4 T16
Clear up counter (UC5) 0 1 Clear disable Clear by matching with TB5RG1H/L
Capture/interrupt timing Capture control 00 01 10 11 Capture disable (Reserved) (Reserved) TB5CP0H/L by TA5OUT rising TB5CP1H/L by TA5OUT falling
Software capture 0 1 Capture value of up counter to TB5CP0H/L Undefined
Inversion trigger control of TB5FF1 when the UC5 match with TB5RG1H/L 0 1 Disable inversion Enable inversion
Inversion trigger of TB5FF1 when the UC5 value is loaded in to TB5CP1H/L 0 1 Disable inversion Enable inversion
Figure 3.8.15 Register for TMRB (9)
92CM27-186
2005-04-20
TMP92CM27
TMRB0 Flip-flop Control Register 7
TB0FFCR (1183H) Bit symbol Read/Write After reset Read-modify Function -write instruction is prohibited 1 TB0FF1C1 W* 1 0 0 TB0FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
6
TB0FF1C0
5
TB0C1T1
4
TB0C0T1 R/W
3
TB0E1T1 0
2
TB0E0T1 0
1
TB0FFC1 W* 1
0
TB0FFC0 1
TB0FF0 inversion trigger 0: Trigger disable 1: Trigger enable
Invert when the UC value is loaded in to TB0CP1H/L. Invert when the UC value is loaded in to TB0CP0H/L. Invert when the UC matches with TB0RG1H/L. Invert when the UC matches with TB0RG0H/L.
TB0FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
Timer flip-flop TB0 (TB0FF0) control 00 01 10 11 Invert Set to "1". Set to "0". Don't care
Inversion trigger of TB0FF0 when the UC match with TB0RG0H/L 0 Trigger disable (Disable inversion) 1 Trigger enable (Enable inversion)
Inversion trigger of TB0FF0 when the UC match with TB0RG1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB0FF0 When the UC value is loaded in to TB0CP0H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB0FF0 When the UC value is loaded in to TB0CP1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
TB0FF1 control 00 01 10 11 Invert value of TB0FF1 Set TB0FF1 to "1". Set TB0FF1 to "0". Don't care
Figure 3.8.16 Register for TMRB (10)
92CM27-187
2005-04-20
TMP92CM27
TMRB1 Flip-flop Control Register 7
TB1FFCR (1193H) Bit symbol Read/Write After reset Read-modify Function -write instruction is prohibited 1 TB1FF1C1 W* 1 0 0 TB1FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
6
TB1FF1C0
5
TB1C1T1
4
TB1C0T1 R/W
3
TB1E1T1 0
2
TB1E0T1 0
1
TB1FFC1 W* 1
0
TB1FFC0 1
TB1FF0 inversion trigger 0: Trigger disable 1: Trigger enable
Invert when the UC value is loaded in to TB1CP1H/L. Invert when the UC value is loaded in to TB1CP0H/L. Invert when the UC matches with TB1RG1H/L. Invert when the UC matches with TB1RG0H/L.
TB1FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
Timer flip-flop TB1 (TB1FF0) control 00 01 10 11 Invert Set to "1". Set to "0". Don't care
Inversion trigger of TB1FF0 when the UC match with TB1RG0H/L 0 Trigger disable (Disable inversion) 1 Trigger enable (Enable inversion)
Inversion trigger of TB1FF0 when the UC match with TB1RG1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB1FF0 When the UC value is loaded in to TB1CP0H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB1FF0 When the UC value is loaded in to TB1CP1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
TB1FF1 control 00 01 10 11 Invert value of TB1FF1 Set TB1FF1 to "1". Set TB1FF1 to "0". Don't care
Figure 3.8.17 Register for TMRB (11)
92CM27-188
2005-04-20
TMP92CM27
TMRB2 Flip-flop Control Register 7
TB2FFCR (11A3H) Bit symbol Read/Write After reset Read-modify Function -write instruction is prohibited 1 TB2FF1C1 W* 1 0 0 TB2FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
6
TB2FF1C0
5
TB2C1T1
4
TB2C0T1 R/W
3
TB2E1T1 0
2
TB2E0T1 0
1
TB2FFC1 W* 1
0
TB2FFC0 1
TB2FF0 inversion trigger 0: Trigger disable 1: Trigger enable
Invert when the UC value is loaded in to TB2CP1H/L. Invert when the UC value is loaded in to TB2CP0H/L. Invert when the UC matches with TB2RG1H/L. Invert when the UC matches with TB2RG0H/L.
TB2FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
Timer flip-flop TB2 (TB2FF0) control 00 01 10 11 Invert Set to "1". Set to "0". Don't care
Inversion trigger of TB2FF0 when the UC match with TB2RG0H/L 0 Trigger disable (Disable inversion) 1 Trigger enable (Enable inversion)
Inversion trigger of TB2FF0 when the UC match with TB2RG1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB2FF0 When the UC value is loaded in to TB2CP0H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB2FF0 When the UC value is loaded in to TB2CP1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
TB2FF1 control 00 01 10 11 Invert value of TB2FF1 Set TB2FF1 to "1". Set TB2FF1 to "0". Don't care
Figure 3.8.18 Register for TMRB (12)
92CM27-189
2005-04-20
TMP92CM27
TMRB3 Flip-flop Control Register 7
TB3FFCR (11B3H) Bit symbol Read/Write After reset Read-modify Function -write instruction is prohibited 1 TB3FF1C1 W* 1 0 0 TB3FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
6
TB3FF1C0
5
TB3C1T1
4
TB3C0T1 R/W
3
TB3E1T1 0
2
TB3E0T1 0
1
TB3FFC1 W* 1
0
TB3FFC0 1
TB3FF0 inversion trigger 0: Trigger disable 1: Trigger enable
Invert when the UC value is loaded in to TB3CP1H/L. Invert when the UC value is loaded in to TB3CP0H/L. Invert when the UC matches with TB3RG1H/L. Invert when the UC matches with TB3RG0H/L.
TB3FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
Timer flip-flop TB3 (TB3FF0) control 00 01 10 11 Invert Set to "1". Set to "0". Don't care
Inversion trigger of TB3FF0 when the UC match with TB3RG0H/L 0 Trigger disable (Disable inversion) 1 Trigger enable (Enable inversion)
Inversion trigger of TB3FF0 when the UC match with TB3RG1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB2FF0 When the UC value is loaded in to TB2CP0H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB3FF0 When the UC value is loaded in to TB3CP1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
TB3FF1 control 00 01 10 11 Invert value of TB3FF1 Set TB3FF1 to "1". Set TB3FF1 to "0". Don't care
Figure 3.8.19 Register for TMRB (13)
92CM27-190
2005-04-20
TMP92CM27
TMRB4 Flip-flop Control Register 7
TB4FFCR (11C3H) Bit symbol Read/Write After reset Read-modify Function -write instruction is prohibited 1 TB4FF1C1 W* 1 0 0 TB4FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
6
TB4FF1C0
5
TB4C1T1
4
TB4C0T1 R/W
3
TB4E1T1 0
2
TB4E0T1 0
1
TB4FFC1 W* 1
0
TB4FFC0 1
TB4FF0 inversion trigger 0: Trigger disable 1: Trigger enable
Invert when the UC value is loaded in to TB4CP1H/L. Invert when the UC value is loaded in to TB4CP0H/L. Invert when the UC matches with TB4RG1H/L. Invert when the UC matches with TB4RG0H/L.
TB4FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
Timer flip-flop TB4 (TB4FF0) control 00 01 10 11 Invert Set to "1". Set to "0". Don't care
Inversion trigger of TB4FF0 when the UC match with TB4RG0H/L 0 Trigger disable (Disable inversion) 1 Trigger enable (Enable inversion)
Inversion trigger of TB4FF0 when the UC match with TB4RG1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB4FF0 When the UC value is loaded in to TB4CP0H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB4FF0 When the UC value is loaded in to TB4CP1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
TB4FF1 control 00 01 10 11 Invert value of TB4FF1 Set TB4FF1 to "1". Set TB4FF1 to "0". Don't care
Figure 3.8.20 Register for TMRB (14)
92CM27-191
2005-04-20
TMP92CM27
TMRB5 Flip-flop Control Register 7
TB5FFCR (11D3H) Bit symbol Read/Write After reset Read-modify Function -write instruction is prohibited 1 TB5FF1C1 W* 1 0 0 TB5FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
6
TB5FF1C0
5
TB5C1T1
4
TB5C0T1 R/W
3
TB5E1T1 0
2
TB5E0T1 0
1
TB5FFC1 W* 1
0
TB5FFC0 1
TB5FF0 inversion trigger 0: Trigger disable 1: Trigger enable
Invert when the UC value is loaded in to TB5CP1H/L. Invert when the UC value is loaded in to TB5CP0H/L. Invert when the UC matches with TB5RG1H/L. Invert when the UC matches with TB5RG0H/L.
TB5FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11".
Timer flip-flop TB5 (TB5FF0) control 00 01 10 11 Invert Set to "1". Set to "0". Don't care
Inversion trigger of TB5FF0 when the UC match with TB5RG0H/L 0 Trigger disable (Disable inversion) 1 Trigger enable (Enable inversion)
Inversion trigger of TB5FF0 when the UC match with TB5RG1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB5FF0 When the UC value is loaded in to TB5CP0H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
Inversion trigger of TB5FF0 When the UC value is loaded in to TB5CP1H/L 0 1 Trigger disable (Disable inversion) Trigger enable (Enable inversion)
TB5FF1 control 00 01 10 11 Invert value of TB5FF1 Set TB5FF1 to "1". Set TB5FF1 to "0". Don't care
Figure 3.8.21 Register for TMRB (15)
92CM27-192
2005-04-20
TMP92CM27
Timer Register (TB0RG0H/L, TB0RG1H/L)
7
TB0RG0L (1188H) bit Symbol Read/Write After reset TB0RG0H bit Symbol (1189H) Read/Write After reset TB0RG1L (118AH) bit Symbol Read/Write After reset TB0RG1H bit Symbol (118BH) Read/Write After reset
6
5
4
W undefined W undefined W undefined W undefined
3
2
1
0
Read-modify-write instruction is prohibited
Capture Register (TB0CP0H/L, TB0CP1H/L)
7
TB0CP0L (118CH) bit Symbol Read/Write After reset TB0CP0H bit Symbol (118DH) Read/Write After reset TB0CP1L (118EH) bit Symbol Read/Write After reset TB0CP1H bit Symbol (118FH) Read/Write After reset
6
5
4
R undefined R undefined R undefined R undefined
3
2
1
0
Figure 3.8.22 Register for TMRB (16)
92CM27-193
2005-04-20
TMP92CM27
Timer Register (TB1RG0H/L, TB1RG1H/L)
7
TB1RG0L (1198H) bit Symbol Read/Write After reset TB1RG0H bit Symbol (1199H) Read/Write After reset TB1RG1L (119AH) bit Symbol Read/Write After reset TB1RG1H bit Symbol (119BH) Read/Write After reset
6
5
4
W undefined W undefined W undefined W undefined
3
2
1
0
Read-modify-write instruction is prohibited
Capture Register (TB1CP0H/L, TB1CP1H/L)
7
TB1CP0L (119CH) bit Symbol Read/Write After reset TB1CP0H bit Symbol (119DH) Read/Write After reset TB1CP1L (119EH) bit Symbol Read/Write After reset TB1CP1H bit Symbol (119FH) Read/Write After reset
6
5
4
R undefined R undefined R undefined R undefined
3
2
1
0
Figure 3.8.23 Register for TMRB (17)
92CM27-194
2005-04-20
TMP92CM27
Timer Register (TB2RG0H/L, TB2RG1H/L)
7
TB2RG0L (11A8H) bit Symbol Read/Write After reset TB2RG0H bit Symbol (11A9H) Read/Write After reset TB2RG1L (11AAH) bit Symbol Read/Write After reset TB2RG1H bit Symbol (11ABH) Read/Write After reset
6
5
4
W undefined W undefined W undefined W undefined
3
2
1
0
Read-modify-write instruction is prohibited
Capture Register (TB2CP0H/L, TB2CP1H/L)
7
TB2CP0L (11ACH) bit Symbol Read/Write After reset TB2CP0H bit Symbol (11ADH) Read/Write After reset TB2CP1L (11AEH) bit Symbol Read/Write After reset TB2CP1H bit Symbol (11AFH) Read/Write After reset
6
5
4
R undefined R undefined R undefined R undefined
3
2
1
0
Figure 3.8.24 Register for TMRB (18)
92CM27-195
2005-04-20
TMP92CM27
Timer Register (TB3RG0H/L, TB3RG1H/L)
7
TB3RG0L (11B8H) bit Symbol Read/Write After reset TB3RG0H bit Symbol (11B9H) Read/Write After reset TB3RG1L (11BAH) bit Symbol Read/Write After reset TB3RG1H bit Symbol (11BBH) Read/Write After reset
6
5
4
W undefined W undefined W undefined W undefined
3
2
1
0
Read-modify-write instruction is prohibited
Capture Register (TB3CP0H/L, TB3CP1H/L)
7
TB3CP0L (11BCH) bit Symbol Read/Write After reset TB3CP0H bit Symbol (11BDH) Read/Write After reset TB3CP1L (11BEH) bit Symbol Read/Write After reset TB3CP1H bit Symbol (11BFH) Read/Write After reset
6
5
4
R undefined R undefined R undefined R undefined
3
2
1
0
Figure 3.8.25 Register for TMRB (19)
92CM27-196
2005-04-20
TMP92CM27
Timer Register (TB4RG0H/L, TB4RG1H/L)
7
TB4RG0L (11C8H) bit Symbol Read/Write After reset TB4RG0H bit Symbol (11C9H) Read/Write After reset TB4RG1L (11CAH) bit Symbol Read/Write After reset TB4RG1H bit Symbol (11CBH) Read/Write After reset
6
5
4
W undefined W undefined W undefined W undefined
3
2
1
0
Read-modify-write instruction is prohibited
Capture Register (TB4CP0H/L, TB4CP1H/L)
7
TB4CP0L (11CCH) bit Symbol Read/Write After reset TB4CP0H bit Symbol (11CDH) Read/Write After reset TB4CP1L (11CEH) bit Symbol Read/Write After reset TB4CP1H bit Symbol (11CFH) Read/Write After reset
6
5
4
R undefined R undefined R undefined R undefined
3
2
1
0
Figure 3.8.26 Register for TMRB (20)
92CM27-197
2005-04-20
TMP92CM27
Timer Register (TB5RG0H/L, TB5RG1H/L)
7
TB5RG0L (11D8H) bit Symbol Read/Write After reset TB5RG0H bit Symbol (11D9H) Read/Write After reset TB5RG1L (11DAH) bit Symbol Read/Write After reset TB5RG1H bit Symbol (11DBH) Read/Write After reset
6
5
4
W undefined W undefined W undefined W undefined
3
2
1
0
Read-modify-write instruction is prohibited
Capture Register (TB5CP0H/L, TB5CP1H/L)
7
TB5CP0L (11DCH) bit Symbol Read/Write After reset TB5CP0H bit Symbol (11DDH) Read/Write After reset TB5CP1L (11DEH) bit Symbol Read/Write After reset TB5CP1H bit Symbol (11DFH) Read/Write After reset
6
5
4
R undefined R undefined R undefined R undefined
3
2
1
0
Figure 3.8.27 Register for TMRB (21)
92CM27-198
2005-04-20
TMP92CM27
3.8.4
Operation in Each Mode
(1) 16-bit interval timer mode Generating interrupts at fixed intervals in this example, the interval time is set the timer register TB0RG1H/L to generate the interrupt INTTB01.
76543210 TB0RUN INTETB0 TB0FFCR TB0MOD TB0RG1H/ L TB0RUN
0 0 X X - 0 X 0 X 1 0 0 X 0 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 1 * * (** = 01, 10, 11) * * * * * * * * ******** 0 0 X X - 1 X 1
Stop TMRB0. Enable INTTB01 and set interrupt level 4. Disable INTTB00. Disable the trigger. Set input clock to prescaler clock, and set capture function to disable. Set the interval time (16 bits).
Start TMRB0.
X : Don't care, - : No change
(2) 16-bit event counter mode In 16-bit timer mode as described in above, the timer can be used as an event counter by selecting the external clock (TB0IN0 pin input) as the input clock. Up counter counting up by rising edge of TB0IN0 pin input. And execution software capture and reading capture value enable reading count value.
76543210 TB0RUN PKFC PKFC2 INTETB0
00XX-0X0 -------1 -------0 X100X000
0 1 * * X 0 0 * * X 0 0 * * 0 1 * * -1 1 0 * * X 1 0 * * 1
Stop TMRB0. Set PK0 to TB0IN0 input mode. Set INTTB01 to enable (Interrupt level4). Set INTTB00 to disable. Set trigger to disable. Set input clock to TB0IN0 pin input. Set number of count. (16 bits) Start TMRB0.
TB0FFCR 11 TB0MOD 00 TB0RG1H/L * * ** TB0RUN 00
X: Don't care, -: No change
Note: When used as an event counter, set the prescaler to "RUN" (TB0RUN = "1").
92CM27-199
2005-04-20
TMP92CM27
(3) 16-bit programmable pulse generation (PPG) output mode Square wave pulses can be generated at any frequency and duty ratio. The output pulse may be either low active or high active. The PPG mode is obtained by inversion of the timer flip-flop TB0FF0 that is to be enabled by the match of the up counter UC0 with timer register TB0RG0H/L or TB0RG1H/L and to be output to TB0OUT0. In this mode, the following conditions must be satisfied. (Set value of TB0RG0H/L) < (Set value of TB0RG1H/L)
Match with TB0RG0H/L (INTTB00 interrupt ) Match with TB0RG1H/L (INTTB01 interrupt) TB0OUT0 pin
Figure 3.8.28 Programmable Pulse Generation (PPG) Output Waveform When the TB0RG0H/L double buffer is enabled in this mode, the value of register buffer 0 will be shifted into TB0RG0H/L at match with TB0RG1H/L. This feature makes easy the handling of low-duty waves.
Match with TB0RG0H/L Match with TB0RG1H/L TB0RG0H/L (Compare value) Register buffer0 Q1 Q2 Up counter = Q1 Up counter = Q2 Shift in to TB0RG0H/L Q2 Q3 Write TB0RG0H/L
Figure 3.8.29 Operation of Register Buffer
92CM27-200
2005-04-20
TMP92CM27
The following block diagram illustrates this mode.
TB0RUN Selector TB0IN0 T1 T4 T16 16-bit up counter UC0 Clear F/F (TB0FF0) TB0OUT0 (PPG output)
Matching 16-bit comparator 16-bit comparator
Selector
TB0RG0H/L
TB0RG0H/L-WR Register buffer 0 TB0RUN Internal data bus TB0RG1H/L
Figure 3.8.30 Block Diagram of 16-Bit PPG Mode The following example shows how to set 16-bit PPG output mode:
76543210 TB0RUN
00XX-0X0 * * * * 0 * * * * X * * * * X * * * * - * * * * 0 * * * * X * * * * 0
Disable the TB0RG0H/L double buffer and stop TMRB0. Set the duty ratio (16 bits). Set the frequency (16 bits). Enable the TB0RG0H/L double buffer. (The duty and frequency are changed on an INTTB01 interrupt.) Set the mode to invert TB0FF0 at the match with TB0RG0H/L, TB0RG1H/L. Clear TB0FF0 to 0. Set input clock to prescaler output clock and disable the capture function.
TB0RG0H/L * * TB0RG1H/L * * TB0RUN 1
TB0FFCR TB0MOD PJFC PJCR TB0RUN
XX001110 001001** (** = 01, 10, 11) -------1 -------1 10XX-1X1
Start TMRB0.
X : Don't care, - : No change
92CM27-201
2005-04-20
TMP92CM27
(4) Capture function examples Used capture function, they can be applicable in many ways, for example: 1. 2. 3. 4. 1. One-shot pulse output from external trigger pulse Frequency measurement Pulse width measurement Measurement of difference time One-shot pulse output from external trigger pulse Set the up counter UC0 in free-running mode with the internal input clock, input the external trigger pulse from TB0IN0 pin, and load the value of up counter into capture register TB0CP0H/L at the rise edge of external trigger pulse. When the interrupt INT4 is generated at the rise edge of external trigger pulse, set the TB0CP0H/L value (c) plus a delay time (d) to TB0RG0H/L (= c + d), and set the above set value (c + d) plus a one-shot width (p) to TB0RG1H/L (= c + d + p). And, set "11" to timer flip-flop control register TB0FFCR. Set to trigger enable for be inverted timer flip-flop TB0FF0 by UC0 matching with TB0RG0H/L and with TB0RG1H/L. When interrupt INTTB01 occurs, this inversion will be disabled after one-shot pulse is output. The (c), (d), and (p) correspond to c, d, and p in Figure 3.8.31.
Set the counter in free-running mode. Count clock (Internal clock) TB0IN0 pin input (External trigger pulse) Match with TB0RG0H/L c c+d Load into capture register 1 and generate INT4. Inversion enable Inversion Set it to disables that enable inversion caused by loading into TB0CP0H/L. Delay time (d) Pulse width (p) Generate INTTB01. c+d+p
Match with TB0RG1H/L
Timer ouput pin TB0OUT0
Figure 3.8.31 One-shot Pulse Output (with delay)
92CM27-202
2005-04-20
TMP92CM27
Example: To output a 2 [ms] one-shot pulse with a 3 [ms] delay to the external trigger pulse via the TB0IN0 pin.
* Clock state System clock: High frequency (fc) High speed clock gear: 1 time (fc) Prescaler: fFPH
Setting in Main Set free running. Count using T1. TB0MOD TB0FFCR
XX101001
Load into TB0CP0 by rising edge of TB0IN0 pin input.
XX000010
Clear TB0FF0 to 0. Disable inversion of TB0FF0.
PJFC PJCR INTE45 INTETB0 TB0RUN
-------1 -------1 ----X100 X000X000 -0XX-1X1
Enable INT4. Disable INTTB00 and INTTB01. Start TMRB0.
Setting in INT4
TB0RG0H/L TB0RG1H/L
TB0FFCR
TB0CP0H/L + 3 ms/T1 TB0RG0H/L + 2 ms/T1 XX--11--
Enable inversion of TB0FF0 when match with TB0RG0H/L or TB0RG1H/L. Set INTTB01 to enable.
INTETB0
X100X---
Setting in INTTB01 TB0FFCR
XX--00--
Disable inversion of TB0FF0 when match with TB0RG0H/L or TB0RG1H/L. Disable INTTB01.
INTETB0
X000X---
X : Don't care, - : No change
When delay time is unnecessary, invert timer flip-flop TB0FF0 when up counter value is loaded into capture register (TB0CP0H/L), and set the TB0CP0H/L value (c) plus the one-shot pulse width (p) to TB0RG1H/L when the interrupt INT4 occurs. The TB0FF0 inversion should be enable when the up counter (UC0) value matches TB0RG1H/L, and disabled when generating the interrupt INTTB01.
92CM27-203
2005-04-20
TMP92CM27
Count clock (Prescaler output clock) c TB0IN0 input (External trigger pulse) Match with TB0RG1H/L Inversion enable Timer output TB0OUT0 pin Pulse width (p) Set it to enable that inversion caused by loading into TB0CP0H/L.
c+p Load into capture register TB0CP0H/L and generate INT4. Generate INTTB01. Load into capture register 1 TB0CP1H/L.
Set it to disable that inversion caused by loading into TB0CP1H/L.
Figure 3.8.32 One-shot Pulse Output of External Trigger Pulse (without delay) 2. Frequency measurement The frequency of the external clock can be measured in this mode. Frequency is measured by the 8-bit timers TMRA01 and the 16-bit timer/event counter. TMRA01 is used to setting of measurement time by inversion TA1FF. Counter clock in TMRB0 select TB0IN0 pin input, and count by external clock input. Set to TB0MOD = "11". The value of the up counter (UC0) is loaded into the capture register TB0CP0H/L at the rise edge of the timer flip-flop TA1FF of 8-bit timers (TMRA01), and into TB0CP1H/L at its fall edge. The frequency is calculated by difference between the loaded values in TB0CP0H/L and TB0CP1H/L when the interrupt (INTTA0 or INTTA1) is generates by either 8-bit timer.
Count clock (TB0IN0 pin input ) TA1FF Load into TB0CP0H/L Load into TB0CP1H/L INTTA0/INTTA1 C1 C2 C1 C2
C1
C2
Figure 3.8.33 Frequency Measurement For example, if the value for the level 1 width of TA1FF of the 8-bit timer is set to 0.5 s and the difference between the values in TB0CP0H/L and TB0CP1H/L is 100, the frequency is 100 / 0.5 s = 200 Hz.
92CM27-204
2005-04-20
TMP92CM27
3. Pulse width measurement This mode allows measuring the high level width of an external pulse. While keeping the 16-bit timer/event counter counting (Free running) with the prescaler output clock input, external pulse is input through the TB0IN0 pin. Then the capture function is used to load the UC0 values into TB0CP0H/L and TB0CP1H/L at the rising edge and falling edge of the external trigger pulse respectively. The interrupt INT4 occurs at the falling edge of TB0IN0. The pulse width is obtained from the difference between the values of TB0CP0H/L and TB0CP1H/L and the internal clock cycle. For example, if the prescaler output clock is 0.8 s and the difference between TB0CP0H/L and TB0CP1H/L is 100, the pulse width will be 100 x 0.8 s = 80 s. Additionally, the pulse width that is over the UC0 maximum count time specified by the clock source can be measured by changing software.
Prescaler output clock C1 TB0IN0 pin input (External pulse) Load into TB0CP0H/L Load into TB0CP1H/L INT4 C1 C2 C1 C2 C2
Figure 3.8.34 Pulse Width Measurement Note: Pulse Width measure by setting "10" to TB0MOD. The external interrupt INT4 is generated in timing of falling edge of TB0IN0 input. In other modes, it is generated in timing of rising edge of TB0IN0 input.
The width of low level can be measured from the difference between the first C2 and the second C1 at the second INT4 interrupt.
92CM27-205
2005-04-20
TMP92CM27
4. Measurement of difference time This mode is used to measure the difference in time between the rising edges of external pulses input through TB0IN0 and TB0IN1. Keep the 16-bit timer/event counter (TMRB0) counting (Free running) with the prescaler output clock, and load the UC0 value into TB0CP0H/L at the rising edge of the input pulse to TB0IN0. Then the interrupt INT4 is generated. Similarly, the UC0 value is loaded into TB0CP1H/L at the rising edge of the input pulse to TB0IN1, generating the interrupt INT5. The time difference between these pulses can be obtained by multiplying the value subtracted TB0CP0H/L from TB0CP1H/L and the internal clock cycle together at which loading the UC0 value into TB0CP0H/L and TB0CP1H/L has been done.
Prescaler output clock C1 TB0IN0 pin input TB0IN1 pin input Load into TB0CP0H/L Load intoTB0CP1H/L INT4 INT5 Difference time C2
Figure 3.8.35 Measurement of Difference Time
92CM27-206
2005-04-20
TMP92CM27
3.9 Pattern Generator/Stepping Motor Control(PG)
The TMP92CM27 contains two 4-bit hardware pattern generator/stepping motor control channels, PG0 and PG1, (hereinafter called PG) which actuate in synchronization with the (8-bit/16-bit) timers. PG (PG0 and PG1) shares the 8-bit input/output port with PL. The output on channel 0 (PG0) is updated in synchronization with the 8-bit timer 0, 1 (TMRA01) or 16-bit timer 0 (TMRB0). The output on channel 1 (PG1) is updated in synchronization with the 8-bit timer 2, 3 (TMRA23) or 16-bit timer 1 (TMRB1). Figure 3.9.1 show block diagram. The PG ports are controlled by the control register (PG01CR) and can select either stepping motor control mode or pattern generation mode. Each bit of PL can be used for a PG port. PG0 and PG1 can be used independently. Since the two PG channels operate in the same manner, except for the following points, only the operation of PG0 will be explained below. Differences between PG0 and PG1 PG0
Trigger signal 8-bit timer 0,1 (TMRA01) or 16-bit timer 0 (TMRB0)
PG1
8-bit timer 2,3 (TMRA23) or 16-bit timer 1 (TMRB1)
b7 1 to 2 excitation b3 SA03
PG03 1/2 excitation
PL3/PG03 (PL7/PG13)
b6
PG02
PL2/PG02 (PL6/PG12) Reverse rotation Normal rotation
b2 Internal data bus
SA02
b5
PG01
PL1/PG01 (PL5/PG11)
b1
SA01
b4
PG00
PL0/PG00 (PL4/PG10)
b0
SA00
Figure 3.9.1 PG Block Diagram
92CM27-207
2005-04-20
TMP92CM27
7
PG01CR Bit symbol (1462H) Read/Write After reset Function PAT1 0
PG1 write mode 0: 8-bit write 1: 4-bit write
6
CCW1 R/W 0
PG1 rotation direction 0: Normal rotation 1: Reverse rotation
5
PG1M 0
PG1 mode (Excitation) 0: 1 step input
4
PG1TE 0
3
PAT0 0
2
CCW0 R/W 0
PG0 rotation direction 0: Normal rotation 1: Reverse rotation
1
PG0M 0
PG0 mode (Excitation) 0: 1 step
0
PG0TE 0
PG0 trigger input enable
PG1 trigger PG0 write mode 0: 8-bit write 1: 4-bit write
enable
excitation 0: Disable or 2 step excitation 1: 1 to 2 step excitation 1: Enable
excitation 0: Disable or 2 step excitation 1: 1 to 2 step excitation 1: Enable
PG0 trigger input enable 0 1 Trigger input disable for PG0 Trigger input enable for PG0
Set the operation mode for PG0 0 1 1or 2 step excitation (Full step) 1 to 2 step excitation (Half step) /PG mode
PG0 (Stepping motor control) rotation direction control 0 1 Normal rotation/PG mode Reverse rotation
Selecting PG0 write mode 0 1 8-bit write 4-bit write/PG mode (Only the shift alternate register can be written.)
Figure 3.9.2 Pattern Generation Control Register (PG01CR) (1/2)
92CM27-208
2005-04-20
TMP92CM27
7
PG01CR Bit symbol (1462H) Read/Write After reset Function PAT1 0
PG1 write mode 0: 8-bit write 1: 4-bit write
6
CCW1 R/W 0
PG1 rotation direction 0: Normal rotation 1: Reverse rotation
5
PG1M 0
PG1 mode (Excitation) 0: 1 step input
4
PG1TE 0
3
PAT0 0
2
CCW0 R/W 0
PG0 rotation direction 0: Normal rotation 1: Reverse rotation
1
PG0M 0
PG0 mode (Excitation) 0: 1 step
0
PG0TE 0
PG0 trigger input enable
PG1 trigger PG0 write mode 0: 8-bit write 1: 4-bit write
enable
excitation 0: Disable or 2 step excitation 1: 1 to 2 step excitation 1: Enable
excitation 0: Disable or 2 step excitation 1: 1 to 2 step excitation 1: Enable
PG1 trigger input enable 0 1 Trigger input disable for PG1 Trigger input enable for PG1
Set the operation mode for PG1 0 1 1 or 2 step excitation (Full step) 1 to 2 step excitation (Half step) /PG mode
PG1 (Stepping motor control) Rotation direction control 0 1 Normal rotation/PG mode Reverse rotation
Selecting PG1 write mode 0 1 8-bit write 4-bit write / PG mode (Onlt the shift alternate register can be written.)
Figure 3.9.3 Pattern Generation Control Register (PG01CR) (2/2)
92CM27-209
2005-04-20
TMP92CM27
7
PG0REG (1460H)
Prohibit readmodifywrite
6
PG02 W 0
5
PG01 0
4
PG00 0
3
SA03
2
SA02 R/W Undefined
1
SA01
0
SA00
Bit symbol Read/Write After reset Function
PG03 0
Pattern generation 0 (PG0) output latch register PG0 can be read by reading the port (PL) that is assigned to PG
Shift alternate register 0 for the PG mode (4-bit write) register
Figure 3.9.4 Pattern generation 0 register (PG0REG)
7
PG1REG (1461H) Bit symbol Read/Write After reset Function 0 PG13
6
PG12 W 0
5
PG11 0
4
PG10 0
3
SA13
2
SA12 R/W Undefined
1
SA11
0
SA10
Pattern generation 1 (PG1) output latch register PG1 can be read by reading the port (PL) that is assigned to PG
Shift alternate register 1 for the PG mode (4-bit write) register
Figure 3.9.5 Pattern generation 1 register (PG1REG)
92CM27-210
2005-04-20
TMP92CM27
7
PG01CR2 (1464H) Bit symbol Read/Write After reset Function
6
5
4
3
2
1
PG1T R/W 0
PG1shift trigger 0: 8-bit timer trigger (TMRA23) 1: 16-bit timer trigger (TMRB1)
0
PG0T 0
PG0 shift trigger 0: 8-bit timer trigger (TMRA01) 1: 16-bit timer trigger (TMRB0)
Selecting PG0 shift trigger 0 1 8-bit timer trigger (TMRA01) 16-bit timer trigger (TMRB0)
Selecting PG1 shift trigger 0 1 8-bit timer trigger (TMRA23) 16-bit timer trigger (TMRB1)
Figure 3.9.6 Pattern Generation Control Register 2 (PG01CR2)
92CM27-211
2005-04-20
TMP92CM27
8-bit timer 0,1 (TMRA01) 16-bit timer 0 (TMRB0)
A Selector B S
PG0
Port L0 to L3
PG01CR2 8-bit timer 2,3 (TMRA23) 16-bit timer 1 (TMRB1) A Selector B S PG1 Port L4 to L7
PG01CR2
Figure 3.9.7 Connection between Timer and Pattern Generator (1) Pattern generation mode When PG01CR = "1", PG functions as a pattern generator. In this mode data is written from the CPU to the shift alternate register only. The pattern data is then written from the shift alternate register to the pattern generator register synchronized to the shift trigger interrupt from the timer. In this mode, PG01CR should be set to "1", PG01CR to "0", and PG01CR to "1". The output from the pattern generator goes to port L; since port or functions can be switched by the bit settings in the port function control register (PLFC) and port function control register 2 (PLFC2), any port pin can be assigned to pattern generator output. Figure 3.3.9 shows the block diagram for this mode.
Trigger signal from timer/ timer interrupt
Writing data to SA03 to SA00 on timer interrupt
Shift alternate register output (SA03 to SA00) Pattern generator register output (PG03 to PG00)
n-1
n
Shifting data from SA03 to SA00 to PG03 to PG00
n+1
n+2
n+3
n-1
n
n+1
n+2
Figure 3.9.8 Example of Pattern Generation Mode
92CM27-212
2005-04-20
TMP92CM27
Shift alternate register
PG03
PG03 (PL3)
BUS3
SA03
PG02
PG02 (PL2)
Internal data bus
BUS2
SA02
PG01
PG01 (PL1)
BUS1
SA01
PG00
PG00 (PL0)
BUS0
SA00
Shift performed on shift trigger from timer
Figure 3.9.9 Pattern Generation Mode Block Diagram (PG0) In pattern generation mode, only writing to the output latch can be disabled by hardware. All other functions behave in the same way as 1 to 2 step excitation in stepping motor control port mode. Hence, data shifted on the trigger signal from a timer must be written before the next trigger signal is output.
92CM27-213
2005-04-20
TMP92CM27
(2) Stepping motor control mode a. 4-phase 1-step/2-step excitation Figure 3.9.10 and Figure 3.9.11 show the output waveforms for 4-phase 1 excitation and 4-phase 2 excitation respectively when channel 0 (PG0) is selected.
Trigger signal from timer PG00 (PL0) b4 b7 b6 b5 b4
PG01 (PL1) PG02 (PL2) PG03 (PL3)
b5
b4
b7
b6
b5
b6
b5
b4
b7
b6
b7
b6
b5
b4
b7
Initial value of PG0REG = 0100xxxx
Note:
bn indicates the initial value of PG0REG b7 b6 b5 b4 x x x x (1) Normal rotation
Trigger signal from timer PG00 (PL0) b4 b5 b6 b7 b4
PG01 (PL1) PG02 (PL2) PG03 (PL3)
b5
b6
b7
b4
b5
b6
b7
b4
b5
b6
b7
b4
b5
b6
b7
Initial value of PG0REG = 0100xxxx
(2) Reverse rotation Figure 3.9.10 Output Waveforms for 4-Phase 1-Step Excitation (Normal rotation and Reverse rotation)
92CM27-214
2005-04-20
TMP92CM27
Trigger signal from timer PG00 (PL0) b4 b7 b6 b5 b4
PG01 (PL1) PG02 (PL2) PG03 (PL3)
b5
b4
b7
b6
b5
b6
b5
b4
b7
b6
b7
b6
b5
b4
b7
Initial value of PG0REG = 1100xxxx
Figure 3.9.11 Output Waveforms for 4-Phase 2-Step Excitation (Normal rotation) The output from PG0 (PL) is latched on the rising edge of the trigger signal from the timer. The direction of shift is specified by the setting of PG01CR: Normal rotation (PG00PG01PG02PG03) is selected when is set to "0"; reverse rotation (PG00PG01PG02PG03) is selected when is set to "1". 4-phase 1-step excitation will be selected when only one bit is set to "1" during the initialization of PG, while 4-phase 2-step excitation will be selected when two consecutive bits are set to "1". The value in the shift alternate registers are ignored when 4-phase 1-step/2-step excitation mode is selected. Figure 3.9.12 shows the block diagram.
PG0 output latch Shift alternate register b7 b3 Internal data bus b6 b2 b5 b1 b4 b0 SA00 Indicates that shifting takes place on the rising edge of the trigger signal from the timer. SA02 PG01 SA01 PG00 PG00 (PL0) PG01 (PL1) SA03 PG02 PG02 (PL2) PG03 PG03 (PL3)
Figure 3.9.12 Block Diagram 4-Phase 1-step Excitation/2-step Excitation (Normal rotation)
92CM27-215
2005-04-20
TMP92CM27
b. 4-phase 1 to 2 step excitation FigureFigure 3.9.12 shows the output waveforms for 4-phase 1 to 2 step excitation.
Trigger signal from timer b4 PG00 (PL0) b5 PG01 (PL1) PG02 (PL2) PG03 (PL3) b6 b2 b5 b1 b4 b0 b7 b3 b1 b4 b0 b7 b3 b6 b2 b0 b7 b3 b6 b2 b5 b1
b7
b3
b6
b2
b5
b1
b4
b0
Initial value of PG0REG = 11001000
Note:
bn denotes the initial value PG0REG b7 b6 b5 b4 b3 b2 b1 b0 (1) Normal rotation
Trigger signal from timer PG00 (P60) b4 b1 b5 b2 b6 b3 b7 b0
PG01 (P61) PG02 (P62) PG03 (P63)
b5
b2
b6
b3
b7
b0
b4
b1
b6
b3
b7
b0
b4
b1
b5
b2
b7
b0
b4
b1
b5
b2
b6
b3
Initial value of PG0REG = 11001000
(2) Reverse rotation Figure 3.9.12 Output Waveforms for 4-phase 1 to 2 step Excitation (Normal rotation and reverse rotation)
92CM27-216
2005-04-20
TMP92CM27
The initialization sequence for 4-phase 1-2 step excitation is as follows. By rearranging the initial value b7 b6 b5 b4 b3 b2 b1 b0 to b7 b3 b6 b2 b5 b1 b4 b0, three consecutive bits are set to 1 and the other bits are set to 0 (Positive logic). For example, if b7, b3, and b6 are set to 1, the initial value becomes 11001000, producing the output waveforms shown in Figure 3.9.12. To generate a negative logic output waveform, the 1's and 0's in the initial value must be inverted. For example, to change the output waveform shown in Figure 3.9.12 negative logic, change the initial value to 00110111. The operation will be explained below for channel 0. The output from PG0 (PL) and from the shift alternate register (SA0) for pattern generation is latched on the rising edge of the trigger signal from the timer. The shift direction is set by PG01CR. Figure 3.9.13 shows the block diagram.
PG0 output latch Shift alternate register b7 PG03
b3
SA03
b6 Internal data bus
PG02
PG02 (P62)
b2
SA02
b5
PG01
PG01 (P61)
b1
SA01
b4
PG00
PG00 (P60)
b0
SA00 Indicates that shifting takes place on the rising edge of the trigger signal from the timer.
Figure 3.9.13 Block Diagram for 4-phase 1 to 2-step Excitation (Normal rotation)
92CM27-217
2005-04-20
TMP92CM27
Setting example: To drive channel 0 (PG0) using 4-phase 1 to 2-step excitation (Normal rotation) when timer 0 is selected, set each register as follows. 76543210 TA01RUN 0 X X X - 0 0 0 TA01MOD 0 0 0 0 - - 0 1 TA1FFCR X X X X 1 0 1 0 TA0REG PLCR PLFC PLFC2 PG01CR * - - - - * - - - - * - - - - * - - - - * 1 1 0 0 * 1 1 0 0 * 1 1 0 1 * 1 1 0 1
Stop timer 0, and clear it to zero. Set 8-bit timer mode and select T1 as the input clock. Clear TA1FF to zero and enable the inversion trigger using timer 0. Set the cycle in the timer register. Set bits PL0 to PL3 to PG0 output. Select PG0 4-phase 1 to 2-step excitation mode and normal rotation. Set an initial value. Start timer 0.
PG0REG 1 1 0 0 1 0 0 0 TA01RUN 0 X X X - 1 - 1 X: Don't care-: No change (3) Trigger signal from timer
The trigger signal from the timer used by PG is not the same as the trigger signal for the timer flip-flop (TA1FF, TA3FF, TB0FF0, TB0FF1, TB1FF0 and TB1FF1); they differ as shown in Table 3.9.1 depending on the operation mode of the timer. Table 3.9.1 Trigger Signal Selection TA1FF Inversion
8-bit timer mode Selected by TA1FFCR when the up counter value matches TA0REG or TA1REG value. When the up counter value matches both TA0REG and TA1REG values (the value of up counter = TA1REG x 28 + TA0REG). When the up counter value matches both TA0REG and TA1REG. When the up counter value matches TA0REG value and PWM cycle.
PG Shift
Selected by TA1FFCR when the up counter value matches TA0REG or TA1REG value. When the up counter value matches both TA0REG and TA1REG values (the value of up counter = TA1REG x 28 + TA0REG). When the up counter value matches TA1REG value (PPG cycle). Trigger signal for PG is not generated.
16-bit timer mode
PPG output mode PWM output mode
Note: To shift PG, TA1FFCR must be set to 1 to enable TA1FF inversion.
PG can be synchronized with the 16-bit timer timer 0/16-bit timer 1. In this case, the PG shift trigger signal from the 16-bit timer is output only when the up counter UC0/UC1 value matches TB0RG1H/L/TB1RG1H/L.
92CM27-218
2005-04-20
TMP92CM27
(4) Application of PG and timer output As explained in the previous section trigger signal from timer, the timings for shifting PG and inverting TFF differ depending on the timer mode. An application which operates PG while operating an 8-bit timer in PPG mode is explained below. To drive a stepping motor, a synchronizing signal is required for the excitation timing, in addition to the value of each phase (PG output). In this application, port L is used as a stepping motor control port to output a synchronizing signal to the TA1OUT pin (shared with PF1).
TA1REG TA1OUT (PF1) TA0REG PG00 (PL0) PG01 (PL1)
PG02 (PL2)
PG03 (PL3)
Figure 3.9.14 Output Waveforms for 4-phase 1-step Excitation Setting example: 76543210 TA01RUN 0 X X X - 0 0 0 TA01MOD 1 0 X X X X 0 1 TA1FFCR X X X X 0 1 TA0REG * * * * * * TA1REG * * * * * * PFCR X - - - - - PFFC X - - - - - PLCR - - - - 1 1 PLFC - - - - 1 1 PLFC2 - - - - 0 0 PG01CR - - - - 0 0 PG0REG * * * * * * TA01RUN 0 X X X - 1 X: Don't care-: No change 1 * * 1 1 1 1 0 0 * 1 X * * - - 1 1 0 1 * 1 Stop timer 0, 1 and clear it to zero. Set timer 0, 1 to PPG output mode and select T1 as the input clock. Enable TA1FF inversion and set TA1FF to "1". Set the duty of TA1OUT to TA0REG. Set the cycle of TA1OUT to TA1REG. Assign PF1 as TA1OUT. Assign PL0 to PL3 as PG0. Set PG0 to 4-phase 1-step excitation mode. Set an initial value. Start timer 0, 1.
92CM27-219
2005-04-20
TMP92CM27
3.10 Serial Channels (SIO)
TMP92CM27 includes 4 serial I/O channels. Each channel is called SIO0, SIO1, SIO2 and SIO3. For all both channels either UART Mode (Asynchronous transmission) or I/O interface mode (Synchronous transmission) can be selected. * I/O interface mode Mode 0: For transmitting and receiving I/O data using the synchronizing signal SCLK for extending I/O. 7-bit data 8-bit data 9-bit data
Mode 1: * UART mode Mode 2: Mode 3:
In mode 1 and mode 2 a parity bit can be added. Mode 3 has a wakeup function for making the master controller start slave controllers via a serial link (Multi-controller system). Figure 3.10.2 and Figure 3.10.3 are block diagrams for each channel. Each channel is structured in prescaler, serial clock generation circuit, receiving buffer and control circuit, and transfer buffer and control circuit. Serial channels 0 to 3 can be used independently. All channels operate in the same function except for the following points; hence only the operation of channel 0 is explained below. Table 3.10.1 Differences between each Channels Channel 0
Pin name TXD0 (PA1) RXD0 (PA0) CTS0 /SCLK0 (PA2) Yes
Channel 1
TXD1 (PA4) RXD1 (PA3) CTS1 /SCLK1 (PA5) Non
Channel 2
TXD2 (PD4) RXD2 (PD3) CTS2 /SCLK2 (PD5) Non
Channel 3
TXD3 (PL1) RXD3 (PL0) CTS3 /SCLK3 (PL2) Non
IrDA mode
This chapter contains the following sections: 3.10.1 Block Diagram 3.10.2 Operation of Each Circuit 3.10.3 SFRs 3.10.4 Operation in Each Mode 3.10.5 Support for IrDA Mode
92CM27-220
2005-04-20
TMP92CM27
* Mode 0 (I/O interface mode)
Bit0 1 2 3 4 5 6 7 Transfer direction
* Mode 1 (7-bit UART mode)
No parity Parity Start Start Bit0 Bit0 1 1 2 2 3 3 4 4 5 5 6 6 Stop Parity Stop
* Mode 2 (8-bit UART mode)
No parity Parity Start Start Bit0 Bit0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 Stop Parity Stop
* Mode 3 (9-bit UART mode)
Start Wakeup Start Bit0 Bit0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 Bit8 Stop Stop
If bit8=1, denoted address (Select code). If bit8=0, denoted data.
Figure 3.10.1 Data Format
92CM27-221
2005-04-20
TMP92CM27
3.10.1
T0
Block Diagram
Prescaler 2 4 8 16 32 64 T2 T8 T32
Serial clock generation circuit BR0CR BR0CR BR0ADD Prescaler T0 T2 T8 T32 Selector TA0TRG (from TMRA0)
Selector
UART mode Selector
SIOCLK
BR0CR Baud rate generater fsys
SC0MOD0 Selector
SC0MOD0
/2 SCLK0 input
I/O interface mode
SCLK0 output
I/O interface mode
SC0CR
Interrupt INTRX0 INTTX0 Transmission counter (UART only / 16) TXDCLK Transsmission control
CTS0
SC0MOD0 (UART only / 16) RXDCLK Receive control
Receive counter
Serial channel interrupt control
SC0MOD0
SC0CR Parity control
SC0MOD0
RXD0
Receive buffer 1 (Shift register)
RB8
Receive buffer 2 (SC0BUF)
Error flag
TB8
Transmission buffer (SC0BUF)
TXD0
SC0CR Internal data bus
Figure 3.10.2 Block Diagram of SIO0
92CM27-222
2005-04-20
TMP92CM27
Prescaler T0 2 4 8 16 32 64 T2 T8 T32
Serial clock generation circuit BR1CR BR1CR BR1ADD T0 T2 T8 T32 Prescaler Selector TA0TRG (from TMRA0)
Selector
UART mode Selector
SIOCLK
fsys
BR1CR Baud rate generater
SC1MOD0 Selector
SC1MOD0
/2 SCLK1 input
I/O interface mode
SCLK1 output
I/O interface mode
SC1CR
Interrupt request INTRX1 INTTX1 Transmission counter (UART only / 16) TXDCLK Transmission control
CTS1
SC1MOD0 (UART only / 16) RXDCLK Receive buffer
Receive control
Serial channel interrupt control
SC1MOD0
SC1CR Parity control
SC1MOD0
RXD1
Receive buffer 1 (Shift register)
RB8
Receive buffer 2 (SC1BUF)
Error flag
TB8
Transmission buffer (SC1BUF)
TXD1
SC1CR Internal data bus
Figure 3.10.3 Block Diagram of SIO1
92CM27-223
2005-04-20
TMP92CM27
Prescaler T0 2 4 8 16 32 64 T2 T8 T32
Serial clock generation circuit BR2CR BR2CR BR2ADD T0 T2 T8 T32 Prescaler Selector TA0TRG (from TMRA0)
Selector
UART mode Selector
SIOCLK
fsys
BR2CR Baud rate generater
SC2MOD0 Selector
SC2MOD0
/2 SCLK2 input
I/O interface mode
SCLK2 output
I/O interface mode
SC2CR
Interrupt request INTRX2 INTTX2 Transmission counter (UART only / 16) TXDCLK Transmission control
CTS2
SC2MOD0 (UART only / 16) RXDCLK Receive buffer
Receive control
Serial channel interrupt control
SC2MOD0
SC2CR Parity control
SC2MOD0
RXD2
Receive buffer 1 (Shift register)
RB8
Receive buffer 2 (SC2BUF)
Error flag
TB8
Transmission buffer (SC2BUF)
TXD2
SC2CR Internal data bus
Figure 3.10.4 Block Diagram of SIO2
92CM27-224
2005-04-20
TMP92CM27
Prescaler T0 2 4 8 16 32 64 T2 T8 T32
Serial clock generation circuit BR3CR BR3CR BR3ADD T0 T2 T8 T32 Prescaler Selector TA0TRG (from TMRA0)
Selector
UART mode Selector
SIOCLK
fsys
BR3CR Baud rate generater
SC3MOD0 Selector
SC3MOD0
/2 SCLK3 input
I/O interface mode
SCLK3 output
I/O interface mode
SC3CR
Interrupt request INTRX3 INTTX3 Transmission counter (UART only / 16) TXDCLK Transmission control
CTS3
SC3MOD0 (UART only / 16) RXDCLK Receive buffer
Receive control
Serial channel interrupt control
SC3MOD0
SC3CR Parity control
SC3MOD0
RXD3
Receive buffer 1 (Shift register)
RB8
Receive buffer 2 (SC3BUF)
Error flag
TB8
Transmission buffer (SC3BUF)
TXD3
SC3CR Internal data bus
Figure 3.10.5 Block Diagram of SIO3
92CM27-225
2005-04-20
TMP92CM27
3.10.2
Operation of Each Circuit
(1) Prescaler There is a 6-bit prescaler for generating a clock to SIO0. The prescaler can be run only case of selecting the baud rate generator as the serial transfer clock. Table 3.10.2 shows prescaler clock resolution into the baud rate generator.
Table 3.10.2 Prescaler Clock Resolution to Baud Rate Generator System Clock Clock Gear
000 (fc) 001 ( /2) 010 ( /4) 0 (fc) 011 ( /8) 100 ( /16) XXX:Don't care
fc fc fc fc
Clock Resolution T0
2 2 / fc
T2
4 2 / fc
T8
6 2 / fc
T32
8 2 / fc 9 2 / fc 10 2 / fc 11 2 / fc 12 2 / fc
2 / fc
4 2 / fc 5 2 / fc 6 2 / fc
3
2 / fc
6 2 / fc 7 2 / fc 8 2 / fc
5
2 / fc
8 2 / fc 9 2 / fc 10 2 / fc
7
The serial interface baud rate generator selects between 4 clock inputs: T0, T2, T8, and T32 among the prescaler outputs.
92CM27-226
2005-04-20
TMP92CM27
(2) Baud rate generator The baud rate generator is a circuit that generates transmission and receiving clocks that determine the transfer rate of the serial channels. The input clock to the baud rate generator, T0, T2, T8, or T32, is generated by the 6-bit prescaler which is shared by the timers. One of these input clocks is selected using the BR0CR field in the baud rate generator control register. The baud rate generator includes a frequency divider, which divides the frequency by 1 or N + (16 - K)/16 to 16 values, determining the transfer rate. The transfer rate is determined by the settings of BR0CR and BR0ADD. * In UART mode The settings BR0ADD are ignored. The baud rate generator divides the selected prescaler clock by N (N = 1, 2, 3 ... 16), which is set in BR0CR. (2) When BR0CR = 1 The N + (16 - K)/16 division function is enabled. The baud rate generator divides the selected prescaler clock by N + (16 - K)/16 using the value of N (N = 2, 3 ... 15) set in BR0CR and the value of K (K = 1, 2, 3 ... 15) set in BR0ADD. If N = 1 and N = 16, the N + (16 - K)/16 division function is disabled. Clear BR0CR register to "0". In I/O interface mode Note: The N + (16 - K)/16 division function is not available in I/O interface mode. Clear BR0CR to 0 before dividing by N. The method for calculating the transfer rate when the baud rate generator is used is explained below. * UART mode Baud rate = * Input clock of baud rate generator Frequency divider for baud rate generator Input clock of baud rate generator Frequency divider for baud rate generator / 16 (1) When BR0CR = 0
*
I/O interface mode Baud rate = /2
92CM27-227
2005-04-20
TMP92CM27
* Integer divider (N divider) For example, when the fc = 12.288 MHz, the input clock frequency = T2, the frequency divider N (BR0CR) = 5, and BR0CR = 0, the baud rate in UART mode is as follows: Clock state System clock: fc/16 5 High speed (fc)
High speed gear: 1 time (fc) Baud rate =
/ 16
= 12.288 x 106 / 16 / 5 / 16 = 9600 (bps) Note: * The N + (16 - K)/16 division function is disabled and setting BR0ADD is invalid. N + (16 - K)/16 divider (UART mode only) Accordingly, when fc = 4.8 MHz, the input clock frequency = T0, the frequency divider N (BR0CR) = 7, K (BR0ADD) = 3, and BR0CR = 1, the baud rate is as follows: * Clock state System clock: High speed (fc)
High speed gear: 1 time (fc) Baud rate = fc/4 / 16 (16 - 3) 7+ 16 13 6 ) / 16 = 9600 (bps) = 4.8 x 10 / 16 / (7 + 16
Table 3.10.3 and Table 3.10.4 show examples of UART mode transfer rates. Additionally, the external clock input is available in the serial clock (Serial channels 0 and 1). The method for calculating the baud rate is explained below: * In UART mode Baud rate = External clock input frequency / 16 It is necessary to satisfy (External clock input cycle) 4/fc * In I/O interface mode Baud rate = External clock input frequency It is necessary to satisfy (External clock input cycle) 16/fc
92CM27-228
2005-04-20
TMP92CM27
Table 3.10.3 UART Baud Rate Selection (when using baud rate generater and BR0CR = 0) Input Clock fc [MHz]
9.830400 12.288000 14.745600 Unit (kbps)
Divider N (Set to BR0CR)
2 4 8 0 5 A 2 3 6 C
T0
76.800 38.400 19.200 9.600 38.400 19.200 115.200 76.800 38.400 19.200
T2
19.200 9.600 4.800 2.400 9.600 4.800 19.200 9.600 4.800
T8
4.800 2.400 1.200 0.600 2.400 1.200 4.800 2.400 1.200
T32
1.200 0.600 0.300 0.150 0.600 0.300 1.200 0.600 0.300
Note 1: Transfer rates in I/O interface mode are eight times faster than the values given above. Note 2: The values in this table are calculated for when fSYS is selected as the system clock, fSYS /1 is selected as the clock gear. Table 3.10.4 UART Baud Rate Selection (when using trigger output of TMRA0 and input clcok of TMRA0 is T1.)
Unit (kbps)
fc
TA0REG0
1H 2H 3H 4H 5H 8H AH 10H 14H
12.288 MHz
96 48 32 24 19.2 12 9.6 6 4.8
12 MHz
9.8304 MHz
76.8 38.4 62.5
8 MHz
6.144 MHz
48 24 16 12 9.6 6 4.8 3 2.4
31.25
31.25 19.2 9.6 4.8
Method for calculating the transfer rate (when TMRA0 is used): fFPH Transfer rate = 3 TA0REG x 2 x 16 (When input clock of TMRA0 is T1)
Note 1: The TMRA0 match detect signal cannot be used as the transfer clock in I/O interface mode. Note 2: The values in this table are calculated for when fc is selected as the system clock, fc is selected as the clock gear.
92CM27-229
2005-04-20
TMP92CM27
(3) Serial clock generation circuit This circuit generates the basic clock for transmitting and receiving data. * In I/O interface mode In SCLK output mode with the setting SC0CR = 0, the basic clock is generated by dividing the output of the baud rate generator by 2, as described previously. In SCLK input mode with the setting SC0CR = 1, the rising edge or falling edge will be detected according to the setting of the SC0CR register to generate the basic clock. * In UART mode The SC0MOD0 setting determines whether the baud rate generator clocks, the internal system clock fSYS, the trigger output signal from TMRA0 or the external clock (SCLK0 pin) is used to generate the basic clock SIOCLK. (4) Receiving counter The receiving counter is a 4-bit binary counter used in UART mode that counts up the pulses of the SIOCLK clock. It takes 16 SIOCLK pulses to receive 1 bit of data; each data bit is sampled three times - on the 7th, 8th, and 9th clock cycles. The value of the data bit is determined from these three samples using the majority rule. For example, if the data bit is sampled respectively as 1, 0, and 1 on 7th, 8th, and 9th clock cycles, the received data bit is taken to be 1. A data bit sampled as 0, 0, and 1 are taken to be 0.
(5) Receiving control * In I/O interface mode In SCLK output mode with the setting SC0CR = 0, the RXD0 pin is sampled on the rising or falling edge of the shift clock which is output on the SCLK0 pin according to the SC0CR setting. In SCLK input mode with the setting SC0CR = 1, the RXD0 pin is sampled on the rising or falling edge of the SCLK input, according to the SC0CR setting. * In UART mode The receiving control block has a circuit that detects a start bit using the majority rule. Received bits are sampled three times; when two or more out of three samples are 0, the bit is recognized as the start bit and the receiving operation commences. The values of the data bits that are received are also determined using the majority rule.
92CM27-230
2005-04-20
TMP92CM27
(6) The receiving buffers To prevent overrun errors, the receiving buffers are arranged in a double-buffer structure. Received data is stored one bit at a time in receiving buffer 1 (which is a shift register). When 7 or 8 bits of data have been stored in receiving buffer 1, the stored data is transferred to receiving buffer 2 (SC0BUF); this causes an INTRX0 interrupt to be generated. The CPU only reads receiving buffer 2 (SC0BUF). Even before the CPU reads receiving buffer 2 (SC0BUF), the received data can be stored in receiving buffer 1. However, unless receiving buffer 2 (SC0BUF) is read before all bits of the next data are received by receiving buffer 1, an overrun error occurs. If an overrun error occurs, the contents of receiving buffer 1 will be lost, although the contents of receiving buffer 2 and SC0CR will be preserved. SC0CR is used to store either the parity bit - added in 8-bit UART mode - or the most significant bit (MSB) - in 9-bit UART mode. In 9-bit UART mode the wake-up function for the slave controller is enabled by setting SC0MOD0 to 1; in this mode INTRX0 interrupts occur only when the value of SC0CR is 1. SIO interruption mode can be set up by the SIMC register. (7) Transmission counter The transmission counter is a 4-bit binary counter that is used in UART mode and which, like the receiving counter, counts the SIOCLK clock pulses; a TXDCLK pulse is generated every 16 SIOCLK clock pulses.
SIOCLK TXDCLK
15
16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1
2
Figure 3.10.6 Generation of Transmission Clock (8) Transmission controller * In I/O interface mode In SCLK output mode with the setting SC0CR = 0, the data in the transmission buffer is output one bit at a time to the TXD0 pin on the rising or falling edge of the shift clock which is output on the SCLK0 pin, according to the SC0CR setting. In SCLK input mode with the setting SC0CR = 1, the data in the transmission buffer is output one bit at a time on the TXD0 pin on the rising or falling edge of the SCLK0 input, according to the SC0CR setting. * In UART mode When transmission data sent from the CPU is written to the transmission buffer, transmission starts on the rising edge of the next TXDCLK, generating a transmission shift clock TXDSFT.
92CM27-231
2005-04-20
TMP92CM27
Handshake function Serial channels 0 and 1 each has a CTS pin. Use of this pin allows data can be sent in units of one data format; thus, overrun errors can be avoided. The handshake functions is enabled or disabled by the SC0MOD0 setting. When the CTS0 pin condition is high level, after completed the current data transmission, data transmission is halted until the CTS0 pin state is low again. However, the INTTX0 interrupt is generated, it requests the next send data to the CPU. The next data is written in the transmission buffer and data transmission is halted. Though there is no RTS pin, a handshake function can be easily configured by setting any port assigned to be the RTS function. The RTS should be output "High" to request send data halt after data receive is completed by software in the receive interrupt routine.
TMP92CM27
TMP92CM27
TXD
CTS
RXD
RTS (Any port)
Transmission side
Receiving side
Figure 3.10.7 Handshake Function
Timing of writing data to transmission buffer
CTS
Send is suspended a from a to b. b 13 14
15
16
1
2
3
14
15
16
1
2
3
SIOCLK TXDCLK TXD Start bit Bit0
Note 1: Note 2:
If the CTS signal goes high during transmission, will be stop next transmission data after completion of the current transmission. Transmission starts on the first falling edge of the TXDCLK clock after the CTS signal has fallen.
Figure 3.10.8 CTS (Clear to send) Signal Timing
92CM27-232
2005-04-20
TMP92CM27
(9) Transmission buffer The transmission buffer (SC0BUF) shifts out and sends the transmission data written from the CPU form the least significant bit in order. When all the bits are shifted out, the transmission buffer becomes empty and generates an INTTX0 interrupt. (10) Parity control circuit When SC0CR in the serial channel control register is set to 1, it is possible to transmit and receive data with parity. However, parity can be added only in 7-bit UART mode or 8-bit UART mode. The SC0CR field in the serial channel control register allows either even or odd parity to be selected. In the case of transmission, parity is automatically generated when data is written to the transmission buffer SC0BUF. The data is transmitted after the parity bit has been stored in SC0BUF in 7-bit UART mode or in SC0MOD0 in 8-bit UART mode. SC0CR and SC0CR must be set before the transmission data is written to the transmission buffer. In the case of receiving, data is shifted into receiving buffer 1, and the parity is added after the data has been transferred to receiving buffer 2 (SC0BUF), and then compared with SC0BUF in 7-bit UART mode or with SC0CR in 8-bit UART mode. If they are not equal, a parity error is generated and the SC0CR flag is set. (11) Error flags Three error flags are provided to increase the reliability of data reception. 1. Overrun error If all the bits of the next data item have been received in receiving buffer 1 while valid data still remains stored in receiving buffer 2 (SC0BUF), an overrun error is generated. The below is a recommended flow when the overrun-error is generated. (INTRX interrupt routine) 1) Read receiving buffer 2) Read error flag 3) if = "1" then a) Set to disable receiving (Program "0" to SC0MOD0) b) Wait to terminate current frame c) Read receiving buffer d) Read error flag e) Set to enable receiving (Program "1" to SC0MOD0) f) Request to transmit again 4) Other
92CM27-233
2005-04-20
TMP92CM27
2. Parity error The parity generated for the data shifted into receiving buffer 2 (SC0BUF) is compared with the parity bit received via the RXD pin. If they are not equal, a parity error is generated. 3. Framing error The stop bit for the received data is sampled three times around the center. If the majority of the samples are 0, a framing error is generated. (12) Timing generation 1. In UART mode Mode
Interrupt generation timing Framing error generation timing Parity error generation timing Overrun error generation timing Note:
Receiving 9 Bits
Center of last bit (Bit8) Center of stop bit
8 Bits + Parity
Center of last bit (Parity bit) Center of stop bit Center of last bit (Parity bit) Center of last bit (Parity bit)
8 Bits, 7 Bits + Parity, 7 Bits
Center of stop bit Center of stop bit Center of stop bit Center of stop bit
-
Center of last bit (Bit8)
In 9 Bits mode and 8 Bits + Parity mode, interrupts coincide with the ninth bit pulse. Thus, when servicing the interrupt, it is necessary to wait for a 1-bit period (to allow the stop bit to be transferred) to allow checking for a framing error.
Transmission Mode
Interrupt generation timing
9 Bits
Just before stop bit is transmitted
8 Bits + Parity
Just before stop bit is transmitted
8 Bits, 7 Bits + Parity, 7 Bits
Just before stop bit is transmitted
2.
In I/O interface mode
SCLK output mode SCLK input mode SCLK output mode SCLK input mode Immediately after last bit data. (See Figure 3.10.31) Immediately after rise of last SCLK signal rising mode, or immediately after fall in falling mode. (See Figure 3.10.32) Timing used to transfer received to data receive buffer 2 (SC0BUF) (e.g., immediately after last SCLK). (See Figure 3.10.33) Timing used to transfer received data to receive buffer 2 (SC0BUF) (e.g., immediately after last SCLK). (See Figure 3.10.34)
Transmission interrupt timing Receiving interrupt timing
92CM27-234
2005-04-20
TMP92CM27
3.10.3
SFRs
7 6
CTSE 0
5
RXE 0
4
WU R/W 0 Wakeup function 0: Disable 1: Enable
3
SM1 0
2
SM0 0
1
SC1 0
0
SC0 0
SC0MOD0 (1202H)
Bit symbol Read/Write After reset Function
TB8 0 Transfer data bit8
Handshake Receive function control control 0: Receive 0: CTS disable disable 1: Receive enable 1: CTS enable
Serial transmission mode 00: I/O interface mode 01: 7-bit UART mode 10: 8-bit UART mode 11: 9-bit UART mode
Serial transmission clock (UART) 00: Timer A0 trigger 01: Baud rate generator 10: Internal clock fsys 11: External clcok (SCLK0 input)
Serial transmission clock source (UART) 00 01 10 11 TMRA0 trigger output signal Baud rate generator Internal clock fsys External clock (SCLK0 input)
Note: The clock selection for the I/O interface mode is controlled by the serial control register (SC0CR). Serial transmission mode 00 01 10 11 Wakeup function 9-bit UART 0 1 Interrupt generated when data is received Interrupt generated only when RB8 = 1 Other modes Don't care UART mode I/O interface mode 7-bit mode 8-bit mode 9-bit mode
Receiving function 0 1 Receive disabled Receive enabled
Handshake function ( CTS pin) 0 1 Disabled (Always transferable) Enabled
Transmission data bit8
Figure 3.10.9
Serial Mode Control Register 0 (for SIO0 and SC0MOD0)
92CM27-235
2005-04-20
TMP92CM27
7
SC1MOD0 (120AH) Bit symbol Read/Write After reset Function 0 Transfer data bit8 TB8
6
CTSE 0
5
RXE 0
4
WU R/W 0 Wakeup function 0: Disable 1: Enable
3
SM1 0
2
SM0 0
1
SC1 0
0
SC0 0
Handshake Receive function control control 0: Receive disable 0: CTS 1: Receive disable enable 1: CTS enable
Serial transmission mode 00: I/O interface mode 01: 7-bit UART mode 10: 8-bit UART mode 11: 9-bit UART mode
Serial transmission clock (UART) 00: Timer A0 trigger 01: Baud rate generator 10: Internal clock fsys 11: External clcok (SCLK1 input)
Serial transmission clock source (UART) 00 01 10 11 TMRA0 trigger output signal Baud rate generator Internal clock fsys External clock (SCLK1 input)
Note: The clock selection for the I/O interface mode is controlled by the serial control register (SC1CR). Serial transmission mode 00 01 10 11 Wakeup function 9-bit UART 0 1 Interrupt generated when data is received Interrupt generated only when RB8 = 1 Other modes Don't care UART mode I/O interface mode 7-bit mode 8-bit mode 9-bit mode
Receiving function 0 1 Receive disabled Receive enabled
Handshake function ( CTS pin) 0 Disabled (Always transferable) 1 Enabled Transmission data bit8
Figure 3.10.10 Serial Mode Control Register 0 (for SIO1 and SC1MOD0)
92CM27-236
2005-04-20
TMP92CM27
7
SC2MOD0 (1212H) Bit symbol Read/Write After reset Function 0 Transfer data bit8 TB8
6
CTSE 0
5
RXE 0
4
WU R/W 0 Wakeup function 0: Disable 1: Enable
3
SM1 0
2
SM0 0
1
SC1 0
0
SC0 0
Handshake Receive function control control 0: Receive disable 0: CTS 1: Receive disable enable 1: CTS enable
Serial transmission mode 00: I/O interface mode 01: 7-bit UART mode 10: 8-bit UART mode 11: 9-bit UART mode
Serial transmission clock (UART) 00: Timer A0 trigger 01: Baud rate generator 10: Internal clock fsys 11: External clcok (SCLK2 input)
Serial transmission clock source (UART) 00 01 10 11 TMRA0 trigger output signal Baud rate generator Internal clock fsys External clock (SCLK2 input)
Note: The clock selection for the I/O interface mode is controlled by the serial control register (SC2CR). Serial transmission mode 00 01 10 11 Wakeup function 9-bit UART 0 1 Interrupt generated when data is received Interrupt generated only when RB8 = 1 Other modes Don't care UART mode I/O interface mode 7-bit mode 8-bit mode 9-bit mode
Receiving function 0 1 Receive disabled Receive enabled
Handshake function ( CTS pin) 0 Disabled (Always transferable) 1 Enabled Transmission data bit8
Figure 3.10.11 Serial Mode Control Register 0 (for SIO2 and SC2MOD0)
92CM27-237
2005-04-20
TMP92CM27
7
SC3MOD0 (121AH) Bit symbol Read/Write After reset Function 0 Transfer data bit8 TB8
6
CTSE 0
5
RXE 0
4
WU R/W 0 Wakeup function 0: Disable 1: Enable
3
SM1 0
2
SM0 0
1
SC1 0
0
SC0 0
Handshake Receive function control control 0: Receive disable 0: CTS 1: Receive disable enable 1: CTS enable
Serial transmission mode 00: I/O interface mode 01: 7-bit UART mode 10: 8-bit UART mode 11: 9-bit UART mode
Serial transmission clock (UART) 00: Timer A0 trigger 01: Baud rate generator 10: Internal clock fsys 11: External clcok (SCLK3 input)
Serial transmission clock source (UART) 00 01 10 11 TMRA0 trigger output signal Baud rate generator Internal clock fsys External clock (SCLK3 input)
Note: The clock selection for the I/O interface mode is controlled by the serial control register (SC3CR). Serial transmission mode 00 01 10 11 Wakeup function 9-bit UART 0 1 Interrupt generated when data is received Interrupt generated only when RB8 = 1 Other modes Don't care UART mode I/O interface mode 7-bit mode 8-bit mode 9-bit mode
Receiving function 0 1 Receive disabled Receive enabled
Handshake function ( CTS pin) 0 Disabled (Always transferable) 1 Enabled Transmission data bit8
Figure 3.10.12 Serial Mode Control Register 0 (for SIO3 and SC3MOD0)
92CM27-238
2005-04-20
TMP92CM27
7
SC0CR (1201H) Bit symbol Read/Write After reset Function RB8 R 0 Received data bit8
6
EVEN R/W 0 Parity 0: Odd 1: Even
5
PE 0 Parity addition 0: Disable 1: Enable
4
OERR 0 Overrun
3
PERR 0 1: Error Parity
2
FERR 0 Framing
1
SCLKS R/W 0 0: SCLK0 1: SCLK0
0
IOC 0 0: Baud rate generator 1: SCLK0 pin input
R (Cleared to 0 when read)
I/O interface input clock selection 0 1 Baud rate generator SCLK0 pin input
Edge selection for SCLK0 pin (I/O mode) 0 1 Transmits and receivers data on rising edge of SCLK0. Transmits and receivers data on falling edge SCLK0. Cleared to 0 when read
Framing error flag Parity error flag Overrun error flag Parity addition enables 0 1 Disabled Enabled
Even parity addition/check 0 1 Odd parity Even parity
Received data bit8 Note: As all error flags are cleared after reading, do not test only a single bit with a bit-testing instruction.
Figure 3.10.13 Serial Control Register (for SIO0 and SC0CR)
92CM27-239
2005-04-20
TMP92CM27
7
SC1CR (1209H) Bit symbol Read/Write After reset Function RB8 R 0 Received data bit8
6
EVEN R/W 0 Parity 0: Odd 1: Even
5
PE 0 Parity addition 0: Disable 1: Enable
4
OERR 0 Overrun
3
PERR 0 1: Error Parity
2
FERR 0 Framing
1
SCLKS R/W 0 0: SCLK1 1: SCLK1
0
IOC 0 0: Baud rate generator 1: SCLK1 pin input
R (Cleared to 0 when read)
I/O interface input clock selection 0 1 Baud rate generator SCLK1 pin input
Edge selection for SCLK1 pin (I/O mode) 0 1 Transmits and receives data on rising edge of SCLK1. Transmits and receives data on falling edge of SCLK1. Cleared to 0 when read
Framing error flag Parity error flag Overrun error flag Parity addition enables 0 1 Disabled Enabled
Even parity addition/check 0 1 Odd parity Even parity
Received data bit8 Note: As all error flags are cleared after reading, do not test only a single bit with a bit-testing instruction.
Figure 3.10.14 Serial Control Register (for SIO1 and SC1CR)
92CM27-240
2005-04-20
TMP92CM27
7
SC2CR (1211H) Bit symbol Read/Write After reset Function RB8 R 0 Received data bit8
6
EVEN R/W 0 Parity 0: Odd 1: Even
5
PE 0 Parity addition 0: Disable 1: Enable
4
OERR 0 Overrun
3
PERR 0 1: Error Parity
2
FERR 0 Framing
1
SCLKS R/W 0 0: SCLK2 1: SCLK2
0
IOC 0 0: Baud rate generator 1: SCLK2 pin input
R (Cleared to 0 when read)
I/O interface input clock selection 0 1 Baud rate generator SCLK2 pin input
Edge selection for SCLK2 pin (I/O mode) 0 1 Transmits and receives data on rising edge of SCLK2. Transmits and receives data on falling edge of SCLK2. Cleared to 0 when read
Framing error flag Parity error flag Overrun error flag Parity addition enables 0 1 Disabled Enabled
Even parity addition/check 0 1 Odd parity Even parity
Received data bit8 Note: As all error flags are cleared after reading, do not test only a single bit with a bit-testing instruction.
Figure 3.10.15 Serial Control Register (for SIO2 and SC2CR)
92CM27-241
2005-04-20
TMP92CM27
7
SC3CR (1219H) Bit symbol Read/Write After reset Function RB8 R 0 Received data bit8
6
EVEN R/W 0 Parity 0: Odd 1: Even
5
PE 0 Parity addition 0: Disable 1: Enable
4
OERR 0 Overrun
3
PERR 0 1: Error Parity
2
FERR 0 Framing
1
SCLKS R/W 0 0: SCLK3 1: SCLK3
0
IOC 0 0: Baud rate generator 1: SCLK3 pin input
R (Cleared to 0 when read)
I/O interface input clock selection 0 1 Baud rate generator SCLK3 pin input
Edge selection for SCKL3 pin (I/O mode) 0 1 Transmits and receives data on rising edge of SCLK3. Transmits and receives data on falling edge of SCLK3. Cleared to 0 when read
Framing error flag Parity error flag Overrun error flag Parity addition enables 0 1 Disabled Enabled
Even parity addition/check 0 1 Odd parity Even parity
Received data bit8 Note: As all error flags are cleared after reading, do not test only a single bit with a bit-testing instruction.
Figure 3.10.16 Serial Control Register (for SIO3 and SC3CR)
92CM27-242
2005-04-20
TMP92CM27
7
BR0CR (1203H) Bit symbol Read/Write After reset Function 0 Always write "0".
6
BR0ADDE 0
5
BR0CK1 0
4
BR0CK0 R/W 0
3
BR0S3 0
2
BR0S2 0
1
BR0S1 0
0
BR0S0 0
-
+ (16 - K)/16 00: T0 division 01: T2 0: Disable 10: T8 1: Enable 11: T32
Setting of the divided frequency
+ (16 - K)/16 divisions enable
0 1 Disable Enable
Setting the input clock of baud rate generator 00 01 10 11 Internal clock T0 Internal clock T2 Internal clock T8 Internal clock T32
7
BR0ADD (1204H) Bit symbol Read/Write After reset Function
6
5
4
3
BR0K3 0
2
BR0K2 R/W 0
1
BR0K1 0
0
BR0K0 0
Sets frequency divisor "K" (Divided by N + (16 - K)/16).
Sets baud rate generator frequency divisor
BR0CR = 1
BR0CR BR0ADD 0000 0001 (K = 1) 1111 (K = 15) 0000 (N = 16) or 0001 (N = 1) Disable Disable 0010 (N = 2)
BR0CR = 0
0001 (N = 1) (UART only) 1111 (N = 15) 0000 (N = 16) Divided by N
~
1111 (N = 15) Disable Divided by N + (16-K) /16
Note1:Availability of +(16-K)/16 division function N 2 to 15 1 , 16 UART mode I/O mode
~
x
x x
The baud rate generator can be set "1" in UART mode and disable +(16-K)/16 division function.Don't use in I/O interface mode. Note2:Set BR0CR to 1 after setting K (K = 1 to 15) to BR0ADD when +(16-K)/16 division function is used.
Figure 3.10.17 Baud Rate Generator Control (for SIO0, BR0CR, and BR0ADD)
~
92CM27-243
2005-04-20
TMP92CM27
7
BR1CR (120BH) Bit symbol Read/Write After reset Function 0 Always write "0".
6
BR1ADDE 0
5
BR1CK1 0
4
BR1CK0 R/W 0
3
BR1S3 0
2
BR1S2 0
1
BR1S1 0
0
BR1S0 0
-
+ (16 - K)/16 00: T0 division 01: T2 0: Disable 10: T8 1: Enable 11: T32
Divided frequency setting
+ (16 - K)/16 divisions enable
0 1 Disabled Enabled
Input clock selection for baud rate generator 00 01 10 11 Internal clock T0 Internal clock T2 Internal clock T8 Internal clock T32
7
BR1ADD (120CH) Bit symbol Read/Write After reset Function
6
5
4
3
BR1K3 0
2
BR1K2 R/W 0
1
BR1K1 0
0
BR1K0 0
Set frequency divisor "K" (Divided by N + (16 - K)/16).
Baud rate generator frequency divisor setting
BR1CR = 1
BR1CR BR1ADD 0000 0001 (K = 1) 1111 (K = 15) 0000 (N = 16) or 0001 (N = 1) Disable Disable 0010 (N = 2) 1111 (N = 15) Disable Divided by N + (16 - K) / 16
BR1CR = 0
0001 (N = 1) (UART only) to 1111 (N = 15) 0000 (N = 16) Divided by N
Note1:Availability of +(16-K)/16 division function N 2 to 15 1 , 16 UART mode I/O mode
~
x
The baud rate generator can be set "1" in UART mode and disable +(16-K)/16 division function.Don't use in I/O interface mode. Note2:Set BR1CR to 1 after setting K (K = 1 to 15) to BR1ADD when +(16-K)/16 division function is used.
Figure 3.10.18 Baud Rate Generater Control (for SIO1, BR1CR, and BR1ADD)
~ x x
92CM27-244
2005-04-20
TMP92CM27
7
BR2CR (1213H) Bit symbol Read/Write After reset Function 0 Always write "0".
6
BR2ADDE 0
5
BR2CK1 0
4
BR2CK0 R/W 0
3
BR2S3 0
2
BR2S2 0
1
BR2S1 0
0
BR2S0 0
-
+ (16 - K)/16 00: T0 division 01: T2 0: Disable 10: T8 1: Enable 11: T32
Divided frequency setting
+ (16 - K)/16 divisions enable
0 1 Disabled Enabled
Input clock selection for baud rate generator 00 01 10 11 Internal clock T0 Internal clock T2 Internal clock T8 Internal clock T32
7
BR2ADD (120CH) Bit symbol Read/Write After reset Function
6
5
4
3
BR2K3 0
2
BR2K2 R/W 0
1
BR2K1 0
0
BR2K0 0
Set frequency divisor "K" (Divided by N + (16 - K)/16).
Baud rate generator frequency divisor setting
BR2CR = 1
BR2CR BR2ADD 0000 0001 (K = 1) 1111 (K = 15) 0000 (N = 16) or 0001 (N = 1) Disable Disable 0010 (N = 2) 1111 (N = 15) Disable Divided by N + (16 - K) / 16
BR2CR = 0
0001 (N = 1) (UART only) to 1111 (N = 15) 0000 (N = 16) Divided by N
Note1:Availability of +(16-K)/16 division function N 2 to 15 1 , 16 UART mode I/O mode
~
x
The baud rate generator can be set "1" in UART mode and disable +(16-K)/16 division function.Don't use in I/O interface mode. Note2:Set BR2CR to 1 after setting K (K = 1 to 15) to BR2ADD when +(16-K)/16 division function is used.
Figure 3.10.19 Baud Rate Generater Control (for SIO2, BR2CR, and BR2ADD)
~ x x
92CM27-245
2005-04-20
TMP92CM27
7
BR3CR (121BH) Bit symbol Read/Write After reset Function 0 Always write "0".
6
BR3ADDE 0
5
BR3CK1 0
4
BR3CK0 R/W 0
3
BR3S3 0
2
BR3S2 0
1
BR3S1 0
0
BR3S0 0
-
+ (16 - K)/16 00: T0 division 01: T2 0: Disable 10: T8 1: Enable 11: T32
Divided frequency setting
+ (16 - K)/16 divisions enable
0 1 Disabled Enabled
Input clock selection for baud rate generator 00 01 10 11 Internal clock T0 Internal clock T2 Internal clock T8 Internal clock T32
7
BR3ADD (121CH) Bit symbol Read/Write After reset Function
6
5
4
3
BR3K3 0
2
BR3K2 R/W 0
1
BR3K1 0
0
BR3K0 0
Set frequency divisor "K" (Divided by N + (16 - K)/16).
Baud rate generator frequency divisor setting
BR3CR = 1
BR3CR BR3ADD 0000 0001 (K = 1) 1111 (K = 15) 0000 (N = 16) or 0001 (N = 1) Disable Disable 0010 (N = 2) 1111 (N = 15) Disable Divided by N + (16 - K) / 16
BR3CR = 0
0001 (N = 1) (UART only) to 1111 (N = 15) 0000 (N = 16) Divided by N
Note1:Availability of +(16-K)/16 division function N 2 to 15 1 , 16 UART mode I/O mode
~
x
The baud rate generator can be set "1" in UART mode and disable +(16-K)/16 division function.Don't use in I/O interface mode. Note2:Set BR3CR to 1 after setting K (K = 1 to 15) to BR3ADD when +(16-K)/16 division function is used.
Figure 3.10.20 Baud Rate Generater Control (for SIO3, BR3CR, and BR3ADD)
~ x x
92CM27-246
2005-04-20
TMP92CM27
7 TB7 SC0BUF (1200H) 7 RB7 Note:
6 TB6
5 TB5
4 TB4
3 TB3
2 TB2
1 TB1
0 TB0 (for transmission)
6 RB6
5 RB5
4 RB4
3 RB3
2 RB2
1 RB1
0 RB0 (for receiving)
Prohibit read-modify-write for SC0BUF
Figure 3.10.21 Serial Transmission/Receiving Buffer Register (for SIO0 and SC0BUF)
7
SC0MOD1 Bit symbol (1205H) Read/Write After reset Function I2S0 R/W 0 IDLE2 0: Stop 1:Run
6
FDPX0 R/W 0 Duplex 0: Half 1: Full
5
4
3
2
1
0
Figure 3.10.22 Serial Mode Control Regsiter 1 (for SIO0 and SC0MOD1)
7 TB7 SC1BUF (1208H) 7 RB7 Note:
6 TB6
5 TB5
4 TB4
3 TB3
2 TB2
1 TB1
0 TB0 (for transmission)
6 RB6
5 RB5
4 RB4
3 RB3
2 RB2
1 RB1
0 RB0 (for receiving)
Prohibit read-modify-write for SC1BUF
Figure 3.10.23 Serial Transmission/Receiving Buffer Register (for SIO1 and SC1BUF)
7
SC1MOD1 Bit symbol (120DH) Read/Write After reset Function I2S1 R/W 0 IDLE2 0: Stop 1: Run
6
FDPX1 R/W 0 Duplex 0: Half 1: Full
5
4
3
2
1
0
Figure 3.10.24 Serial Mode Control Regsiter 1 (for SIO1 and SC1MOD1)
92CM27-247
2005-04-20
TMP92CM27
7 TB7 SC2BUF (1210H) 7 RB7 Note:
6 TB6
5 TB5
4 TB4
3 TB3
2 TB2
1 TB1
0 TB0 (for transmission)
6 RB6
5 RB5
4 RB4
3 RB3
2 RB2
1 RB1
0 RB0 (for receiving)
Prohibit read-modify-write for SC2BUF
Figure 3.10.25 Serial Transmission/Receiving Buffer Register (for SIO2 and SC2BUF)
7
SC2MOD1 Bit symbol (1215H) Read/Write After reset Function I2S2 R/W 0 IDLE2 0: Stop 1: Run
6
FDPX2 R/W 0 Duplex 0: Half 1: Full
5
4
3
2
1
0
Figure 3.10.26 Serial Mode Control Regsiter 1 (for SIO2 and SC2MOD1)
7 TB7 SC3BUF (1218H) 7 RB7 Note:
6 TB6
5 TB5
4 TB4
3 TB3
2 TB2
1 TB1
0 TB0 (for transmission)
6 RB6
5 RB5
4 RB4
3 RB3
2 RB2
1 RB1
0 RB0 (for receiving)
Prohibit read-modify-write for SC3BUF
Figure 3.10.27 Serial Transmission/Receiving Buffer Register (for SIO3 and SC3BUF)
7
SC3MOD1 Bit symbol (121DH) Read/Write After reset Function I2S3 R/W 0 IDLE2 0: Stop 1: Run
6
FDPX3 R/W 0 Duplex 0: Half 1: Full
5
4
3
2
1
0
Figure 3.10.28 Serial Mode Control Regsiter 1 (for SIO3 and SC3MOD1)
92CM27-248
2005-04-20
TMP92CM27
3.10.4
Operation in Each Mode
(1) Mode 0 (I/O interface mode) This mode allows an increase in the number of I/O pins available for transmitting data to or receiving data from an external shift register. This mode includes the SCLK output mode to output synchronous clock SCLK and SCLK input mode to input external synchronous clock SCLK.
Output extension TMP92CM27 Shift register A B C D E F G H
Input extension TMP92CM27 Shift register A B C D E F G H
TXD SCLK Port
SI SCK RCK
RXD SCLK Port
QH CLOCK S/ L
TC74HC595 or equivalent
TC74HC165 or equivalent
Figure 3.10.29 Example of SCLK Output Mode Connection
Output extension TMP92CM27 Shift register A B C D E F G H Input extension TMP92CM27 Shift register A B C D E F G H
TXD SCLK Port
SI SCK RCK
RXD SCLK Port
QH CLOCK S/ L
TC74HC595 or equivalent External clock
TC74HC165 or equivalent External clock
Figure 3.10.30 Example of SCLK Output Mode Connection
92CM27-249
2005-04-20
TMP92CM27
1. Transmission In SCLK output mode 8-bit data and a synchronous clock are output on the TXD0 and SCLK0 pins respectively each time the CPU writes the data to the transmission buffer. When all data is outputted, INTES0 will be set to generate the INTTX0 interrupt.
Timing of writing transmission data SCLK0 output (=0 rising mode) SCLK0 output (=1 falling mode) TXD0 ITX0C (INTTX0 interrupt request) bit 0 bit 1 bit 6 bit 7 (Internal clock timinig)
Figure 3.10.31 Transmission Operation in I/O Interface Mode (SCLK0 output mode) In SCLK input mode, 8-bit data is output from the TXD0 pin when the SCLK0 input becomes active after the data has been written to the transmission buffer by the CPU. When all data is outputted, INTES0 will be set to generate INTTX0 interrupt.
SCLK0 input ( = 0 rising mode) SCLK0 input ( = 1 falling mode) TXD0 ITX0C (INTTX0 interrupt request) Bit0 Bit1 Bit5 Bit6
Bit7
Figure 3.10.32 Transmission Operation in I/O Interface Mode (SCLK0 input mode)
92CM27-250
2005-04-20
TMP92CM27
2. Receiving In SCLK output mode, the synchronous clock is outputted from SCLK0 pin and the data is shifted to receiving buffer 1. This starts when the receive interrupt flag INTES0 is cleared by reading the received data. When 8-bit data are received, the data will be transferred to receiving buffer 2 (SC0BUF according to the timing shown below) and INTES0 will be set to generate INTRX0 interrupt. The outputting for the first SCLK0 starts by setting SC0MOD0 to 1.
IRX0C (INTRX0 interrupt request) SCLK0 output ( = 0: rising mode) SCLK0 output ( = 1: falling mode) RXD0 Bit0 Bit1 Bit6 Bit7
Figure 3.10.33 Receiving Operation in I/O Interface Mode (SCLK0 output mode) In SCLK input mode, the data is shifted to receiving buffer 1 when the SCLK input becomes active after the receive interrupt flag INTES0 is cleared by reading the received data. When 8-bit data is received, the data will be shifted to receiving buffer 2 (SC0BUF according to the timing shown below) and INTES0 will be set again to be generate INTRX0 interrupt.
SCLK0 input ( = 0: rising mode) SCLK0 input ( = 1: falling mode) RXD1 IRX0C (INTRX0 interrupt request) Bit0 Bit1 Bit5 Bit6 Bit7
Figure 3.10.34 Receiving Operation in I/O Interface Mode (SCLK0 input mode) Note: If receiving, set to the receive enable state (SC0MOD0 = 1) in both SCLK input mode and output mode.
92CM27-251
2005-04-20
TMP92CM27
3. Transmission and receiving (Full duplex mode) When the full duplex mode is used, set the level of receive interrupt to "0" and set enable the interrupt level (1 to 6) to the transfer interrupts. In the transfer interrupt program, the receiving operation should be done like the below example before setting the next transfer data. Example: Channel 0, SCLK output Baud rate = 9600 bps fc = 19.6608 MHz
Main routine INTES0 PACR PAFC PAFC2 SC0MOD0 SC0MOD1 SC0CR BR0CR SC0MOD0 SC0BUF 76543210 x001x000 Set transmission interrupt level, and disable receiving interrupt. Set to PA0 (RXD0), PA1 (TXD0), and PA2 (SCLK0).
---- ---- xx-- 0000 1100 0000 0011 0010
-110 -111 -0--
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
Set to I/O interface mode. Set to full duplex mode. Output SCLK, select rising edge. Set to 9600 bps. Set receive to enable. Set transmission data.
Transmission interrupt routine Acc SC0BUF SC0BUF X: Don't care, -: No change
Read receiving data. Set transmission data.
92CM27-252
2005-04-20
TMP92CM27
(2) Mode 1 (7-bit UART mode) 7-bit UART mode is SC0MOD0 to 01. selected by setting serial channel mode register
In this mode, a parity bit can be added. Use of a parity bit is enabled or disabled by the setting of the serial channel control register SC0CR bit; whether even parity or odd parity will be used is determined by the SC0CR setting when SC0CR is set to 1 (Enabled). Example: When transmitting data of the following format, the control registers should be set as described below. This explanation applies to channel 0.
Start Bit0 1 2 3 4 5 6
Even parity
Stop
Transfer direction (Transfer speed 2400 bps at fc = 19.6608 MHz)
PACR PAFC
76543210 -------1
-------1
X 0 X 1 - X 1 X 0 - 0 0 0 0 -
Set PA1 to as TXD0 pin. Set to 7-bit UART mode. Add even parity. Set to 2400 bps. Set INTTX0 interrupt to enable, set to level 4. Set transmission data.
PAFC2 XXX- X0-X SC0MOD SC0CR X11X BR0CR 0010 INTES0 X100 SC0BUF X : Don't care, - : No change
- 1 0 0 -
(3) Mode 2 (8-bit UART mode) 8-bit UART mode is selected by setting SC0MOD0 to 10. In this mode, a parity bit can be added (Use of a parity bit is enabled or disabled by the setting of SC0CR); whether even parity or odd parity will be used is determined by the SC0CR setting when SC0CR is set to 1 (Enabled). Example: When receiving data of the following format, the control registers should be set as described below.
Start Bit0 1 2 3 4 5 6 7
Odd parity
Stop
Transfer direction (Transfer speed 9600 bps at fc = 19.6608 MHz)
92CM27-253
2005-04-20
TMP92CM27
Main routine PACR PAFC SC0MOD SC0CR BR0CR INTES0

- - - X 0 X
76543210 ------0 -- ----1 01X1001 01XXX00 0011000 ---X100
Set PA0 (RXD0) to input pin. Set to 8-bit UART mode, set receives to enable. Add odd parity. Set to 9600 bps. Set INTTX0 interrupt to enable, set to level 4.
Interrupt routine processing Acc SC0CR AND 00011100 if Acc
0 then ERROR
Check for error. Read receiving data.
Acc SC0BUF X : Don't care, - : No change
(4) Mode 3 (9-bit UART mode) 9-bit UART mode is selected by setting SC0MOD0 to 11. In this mode parity bit cannot be added. In the case of transmission the MSB (9th bit) is programmed to SC0MOD0. In the case of receiving it is stored in SC0CR. When the buffer is written and read, the MSB is read or written first, before the rest of the SC0BUF data. Wakeup function In 9-bit UART mode, the wakeup function for slave controllers is enabled by setting SC0MOD0 to 1. The interrupt INTRX0 occurs only when = 1.
TXD Master
RXD
TXD Slave 1
RXD
TXD Slave 2
RXD
TXD Slave 3
RXD
Note:
The TXD pin of each slave controller must be in open-drain output mode.
Figure 3.10.35 Serial Link Using Wakeup Function
92CM27-254
2005-04-20
TMP92CM27
Protocol 1. 2. 3. Select 9-bit UART mode on the master and slave controllers. Set the SC0MOD0 bit on each slave controller to 1 to enable data receiving. The master controller transmits one-frame data including the 8-bit select code for the slave controllers. The MSB (Bit8) is set to "1".
Start Bit0 1 2 3 4 5 6 7 8 "1" Stop
Select code of slave controller
4. 5.
Each slave controller receives the above frame. If it matches with own select code, clears bit to "0". The master controller transmits data to the specified slave controller whose SC0MOD0 bit is cleared to "0". The MSB (Bit8) is cleared to "0".
Start Bit0 1 2 3 Data 4 5 6 7 Bit8 "0" Stop
6.
The other slave controllers (whose bits remain at 1) ignore the received data because their MSB (Bit8 or ) are set to "0", disabling INTRX0 interrupts. The slave controller ( bit = "0") can transmit data to the master controller, and it is possible to indicate the end of data receiving to the master controller by this transmission.
92CM27-255
2005-04-20
TMP92CM27
Example: To link two slave controllers serially with the master controller using the system clock fSYS as the transfer clock.
TXD Master
RXD
TXD Slave 1
RXD
TXD Slave 2
RXD
Select code 00000001
Select code 00001010
*
Main routine PACR PAFC PAFC2 INTES0 SC0MOD0 SC0BUF
Master controller setting
76543210 ------10
------11 XXX-XX0X X100X101 10101110 00000001
Set PA0 to RXD0, and set PA1 to TXD0 pin. Set INTTX0 to enable, and set interrupt level to level 4. Set INTRX0 to enable, and set interrupt level to level 5. Set to 9-bit UART mode, and set transfer clock to fSYS. Set select code of slave 1.
Interrupt routine (INTTX0) SC0MOD0 0 - - - - - - - SC0BUF
Set TB8 to "0". Set transmission data.
*
Main routine PACR PAFC PAFC2 INTES0
Slave setting

76543210 ------10
------11
XXX-XX1X X101X110 00111110
Set PA0 to RXD0, and PA1 to TXD0 (open-drain output). Set INTRX0 to enable, and set interrupt level to level 5. Set INTRX0 to enable, and set interrupt level to level 6 Set to = "1" in 9-bit UART mode transfer clock fSYS.
SC0MOD0
Interrupt routine (INTRX0) Acc SC0BUF if Acc = Select code Then ---0---- SC0MOD0 X : Don't care, - : No change
Clear to = "0".
92CM27-256
2005-04-20
TMP92CM27
3.10.5
Support for IrDA Mode
SIO0 includes support for the IrDA 1.0 infrared data communication specification.Figure 3.10.36 shows the block diagram.
Transmission data
IR modulator Modem
TXD0
IR transmitter & LED IR module
IR output
SIO0 Receive data
IR demodulator
RXD0
IR receiver
IR input
TMP92CM27
Figure 3.10.36 Block Diagram of IrDA (SIO0) (1) Modulation of transmission data When the transmission data is 0, output "H" level with either 3/16 or 1/16 times for width of baud-rate (Selectable in software). Moreover, pulse width is chosen in SIR0CR.When data is "1", modem output "L" level.
Start
Transmission data Output after modulation
0
1
0
0
1
1
0
0
Stop
Figure 3.10.37 Example of Modulation of Transmission Data (SIO0) (2) Modulation of receiving data When the receive data has the effective high level pulse width (Software selectable), the modem outputs "0" to SIO0. Otherwise modem outputs "1" to SIO0. Effective pulse width is chosen in SIR0CR.
Receiving pulse = "0" Receiving pulse = "1" Data after modulation Start 1 0 0 1 0 1 1 0 Stop
Figure 3.10.38 Example of Modulation of Receiving Data (SIO0)
92CM27-257
2005-04-20
TMP92CM27
(3) Data format Format of transmission/receiving must set to data length 8-bit, without parity bit, 1 bit of stop bit. Any other settings don't guarantee the normal operation. (4) SFR Figure 3.10.39 shows the control register SIR0CR. If change setting this register, must set it after set operation of transmission/receiving to disable (Both and of this register should be clear to 0). Any changing for this register during transmission or receiving operation doesn't guarantee the normal operation. The following example describes how to set this register: 1) 2) 3) 4) SIO setting LD (SIR0CR), 07H LD (SIR0CR), 37H Transmission/receiving ; The modem operates as follows: * * (5) Notes 1. Making baud rate when using IrDA In baud rate during using IrDA, must set "01" to SC0MOD0 in SIO by using baud rate generator. TA0TRG, fSYS, SCLK0 input of except for it can not using. 2. Output pulse width and baud rate generator during transmission IrDA As the IrDA 1.0 physical layer specification, the data transfer speed and infra-red pulse width is specified. Table 3.10.5 Specification of Transfer Rate and Pulse Width Transfer Modulation Rate
2.4 kbps 9.6 kbps 19.2 kbps 38.4 kbps 57.6 kbps 115.2 kbps RZI RZI RZI RZI RZI RZI
; Set SIO side. ; Set receiving effect pulse width to 16X+100ns. ; TXEN, RXEN enable the transmission and receiving.
SIO0 starts transmitting. IR receiver starts receiving.
Transfer Rate Tolerance (% of Rate)
0.87 0.87 0.87 0.87 0.87 0.87
Minimum of Pulse Width
1.41 s 1.41 s 1.41 s 1.41 s 1.41 s 1.41 s
Typical of Pulse Width 3/16
78.13 s 19.53 s 9.77 s 4.88 s 3.26 s 1.63 s
Maximum of Pulse Width
88.55 s 22.13 s 11.07 s 5.96 s 4.34 s 2.23 s
The infra-red pulse width is specified either baud rate T x 3/16 or 1.6 s (1.6 s is equal to T x 3/16 pulse width when baud rate is 115.2 kbps). The TMP92CM27 has function which is selectable the transmission pulse width either 3/16 or 1/16. But T x 1/16 pulse width can be selected when the baud rate is equal or less than 38.4 kbps only. When 57.6 kbps and 115.2 kbps, the output pulse width should not be set to T x 1/16.
92CM27-258
2005-04-20
TMP92CM27
As the same reason, + (16 - K)/16 division function in the baud rate generator of SIO0 cannot be used to generate 115.2 kbps baud rate. Also when the 38.4 kbps and 1/16 pulse width, + (16 - K)/16 division function cannot be used. Table 3.10.6 shows baud rate and pulse width for (16 - K)/16 division function. Table 3.10.6 Baud Rate and Pulse Width for (16 - K)/16 Division Function
Output Pulse Width
T x 3/16 T x 1/16
Baud Rate 115.2 kbps
x -
57.6 kbps
-
38.4 kbps
x
19.2 kbps
9.6 kbps
2.4 kbps
: Can be used (16 - K)/16 division function.
x: Cannot be used (16 - K)/16 division function. -: Cannot be set to T x 1/16 pulse width.
7
SIR0CR (1207H) Bit symbol Read/Write After reset Function 0 PLSEL
6
RXSEL 0
data
5
TXEN 0
Transmission 0: Disable 1: Enable
4
RXEN 0
Receiving operation 0: Disable 1: Enable
3
SIR0WD3 R/W 0
2
SIR0WD2 0
1
SIR0WD1 0
0
SIR0WD0 0
Selection Receiving transmission data logic pulse width 0: "H" pulse 0: 3/16 1: 1/16 1: "L" pulse
Select receiving effective pulse width Set effective pulse width for equal or more than 2x x (Value + 1) + 100 ns Can be set: 1 to 14 Cannot be set: 0, 15
Select receiving effective pulse width Formula: Receiving effective pulse width 2x x (Setting value + 1) + 100 ns x = 1/fFPH 0000 0001 1110 1111 Cannot be set. Pulse width of equal or more than 4x + 100 ns is effective. Pulse width of equal or more than 30x + 100 ns is effective. Cannot be set.
Note: If a pulse width complying with the IrDA 1.0 standard (1.6s min.) can be guaranteed with a low baud rate, setting this bit to "1" shortens the duration of infrared ray activation resulting in reduced power dissipation.
Figure 3.10.39 IrDA Control Register0 (for SIO0)
92CM27-259
~
Enable of receiving operation 0 1 Disable receiving operation. (Received input is ignored.) Enable receiving operation. Enable of transmission operation 0 1 Disable transmission operation (Input from SIO is ignored.) Enable transmission operation. Select transmission pulse width 0 1 Pulse width of 3/16 Pulse width of 1/16
2005-04-20
TMP92CM27
3.11 Serial Bus Interface (SBI)
The TMP92CM27 has 2-channel serial bus interface. Serial bus interface (SBI0, SBI1) include following 2 operation modes. I2C bus mode (Multi master) Clocked-synchronous 8-bit SIO mode The serial bus interface is connected to an external device through PC0(SDA0), PC1(SCL0), PC3(SDA1) and PC4(SCL1) in the I2C bus mode; and through PC0(SO0), PC1(SI0), PC2(SCK0), PC3(SO1), PC4(SI1) and PC5(SCK1) in the clocked-synchronous 8-bit SIO mode. Each of the channels can be operated independently. Since both SBI0 and SBI1 channels operate in the same manner, a channel explains only the case of SBI0. Each pin is specified as follows: (SBI0)
PCCR I C bus mode Clocked-synchronous 8-bit SIO mode X: Don't care Note ) Set PCFC2 in the clocked-synchronous 8-bit SIO mode to "1" when the oped drain output is necessary.
2
PCFC X11 111
PCFC2 11 0n(Note)
X11 000(SCK input) 100(SCK output)
Each pin is specified as follows: (SBI1)
PCCR I2C bus mode Clocked-synchronous 8-bit SIO mode X: Don't care Note ) Set PCFC2 in the clocked-synchronous 8-bit SIO mode to "1" when the oped drain output is necessary. X11 000(SCK input) 100(SCK output) PCFC X11 111 PCFC2 11 0n(Note)
92CM27-260
2005-04-20
TMP92CM27
3.11.1
Configuration
INTSBI0 interrupt requests SCL SCK SIO clock control I/O control Divider Transfer control circuit SIO data control SO SI PC0 (SO0/SDA0)
PC1 (SI0/SCL0)
I C bus clock sync. Noise canceller + Control
2
Shift register
I2C bus data control
PC2 (SCK0) Noise canceller SDA
SBI0CR2/ SBI0SR SBI0 control register 2/ SBI0 status register
I2C0AR I2C0 bus address register
SBI0BR SBI0 data buffer register
SBI0CR1 SBI0 control register 1
SBI0BR0, 1 SBI0 baud rate registers 0 and 1
Figure 3.11.1 Serial Bus Interface (SBI0)
INTSBI1 interrupt requests SCL SCK SIO clock control I/O control Divider Transfer control circuit SIO data control SO SI PC3 (SO1/SDA1)
PC4 (SI1/SCL1)
I C bus clock sync. Noise canceller + Control
2
Shift register
I C bus data control
2
PC5 (SCK1) Noise canceller SDA
SBI1CR2/ SBI1SR SBI1 control register 2/ SBI1 status register
I2C1AR I2C1 bus address register
SBI1BR SBI1 data buffer register
SBI1CR1 SBI1 control register 1
SBI1BR0, 1 SBI1 baud rate registers 0 and 1
Figure 3.11.2 Serial Bus Interface (SBI1)
92CM27-261
2005-04-20
TMP92CM27
3.11.2
Control
The following registers are used to control the serial bus interface and monitor the operation status. * Serial bus interface control register 1 (SBI0CR1), (SBI1CR1) * Serial bus interface control register 2 (SBI0CR2), (SBI1CR2) * Serial bus interface data buffer register (SBI0DBR), (SBI1DBR) * I2C bus address register (I2C0AR), (I2C1AR) * Serial bus interface status register (SBI0SR), (SBI1SR) * Serial bus interface baud rate register 0 (SBI0BR0), (SBI1BR0) * Serial bus interface baud rate register 1 (SBI0BR1), (SBI1BR1) The above registers differ depending on a mode to be used. Refer to Section 3.11.4 "I2C Bus Mode Control Register" and 3.11.7 "Clocked-synchronous 8-Bit SIO Mode Control".
3.11.3
Data Format in I2C Bus Mode
Data format in I C bus mode is shown Figure 3.11.3 (a) Addressing format
8 bits 1 RA /C WK 1 to 8 bits Data 1 A C K 1 or more 1 to 8 bits Data 1 A CP K
2
S
Slave address 1
(b) Addressing format (with restart)
8 bits S Slave address 1 1 RA /C WK 1 to 8 bits Data 1 or more 1 A CS K 8 bits Slave address 1 1 RA /C WK 1 to 8 bits Data 1 or more 1 A CP K
(c) Free data format (transfer format transfer from master device to slave device)
8 bits S Slave address 1 S: Start condition 1 A C K 1 to 8 bits Data 1 A C K 1 or more 1 to 8 bits Data 1 A CP K
R/ W : Direction bit ACK: P: Acknowledge bit Stop condition
2
Figure 3.11.3 Data Format in I C Bus Mode
92CM27-262
2005-04-20
TMP92CM27
3.11.4
I2C Bus Mode Control Register
The following registers are used to control and monitor the operation status when using the serial bus interface (SBI0, SBI1) in the I2C bus mode. Serial Bus Interface Control Register 1 7 6
BC1 W 0 0 0 Select number of transferred bits (Note 1)
5
BC0
4
ACK R/W 0 Acknowledge mode specification 0: Not generate 1: Generate
3
2
SCK2 W 0
1
SCK1
0
SCK0/ SWRMON R/W 0/1 (Note 3)
SBI0CR1 (1240H)
Bit symbol Read/Write After reset
BC2
0
ReadFunction modify-write instruction is prohibited.
Internal serial clock selection and software reset monitor (Note 2)
Internal serial clock selection at write 000 001 010 011 100 101 110 111 n=5 n=6 n=7 n=8 n=9 n = 10 n = 11 (Reserved) - kHz (Note4) - kHz (Note4) - kHz (Note4) 60.6 kHz 30.8 kHz 15.5 kHz 7.78 kHz (Reserved) System clock: fc Clock gear pin) Frequency = fc n 2 +8 [Hz] : fc/1 fc = 16 MHz (Output to SCL
Software reset state monitor at read 0 1 During software reset Initial data
Acknowledge mode selection 0 1 Not generate clock pulse for acknowledge signal Generate clock for acknowledge signal
Select number of bits transferred = 0 Number of clock pulses 8 1 2 3 4 5 6 7 Data length = 1 Number of clock pulses 9 2 3 4 5 6 7 8 Data length
000 001 010 011 100 101 110 111 Note 1: Note 2: Note 3:
8 1 2 3 4 5 6 7
8 1 2 3 4 5 6 7
Set the to "000" before switching to a clocked-synchronous 8-bit SIO mode. For the frequency of the SCL line clock, see section 3.11.5 (3) "Serial clock". Initial data of SCK0 is "0", SWRMON is "1".
Note 4: This I2C bus circuit does not support fast mode, it supports standard mode only. The fscl speed can be selected over 100kbps by fc and , however it's irregular operation.
Figure 3.11.4 Register for I C Bus Mode (SBI0, SBI0CR1)
2
92CM27-263
2005-04-20
TMP92CM27
Serial Bus Interface Control Register 1 7
SBI1CR1 (1248H) Bit symbol Read/Write After reset ReadFunction modify-write instruction is prohibited. 0 BC2
6
BC1 W 0
5
BC0
4
ACK R/W
3
2
SCK2 W 0
1
SCK1
0
SCK0/ SWRMON R/W 0/1 (Note 3)
0
Select number of transferred bits (Note 1)
0 Acknowledge mode specification 0: Not generate 1: Generate
0
Internal serial clock selection and software reset monitor (Note 2)
Internal serial clock selection at write 000 001 010 011 100 101 110 111 n=5 n=6 n=7 n=8 n=9 n = 10 n = 11 (Reserved) - kHz (Note4) - kHz (Note4) - kHz (Note4) 60.6 kHz 30.8 kHz 15.5 kHz 7.78 kHz (Reserved) System clock: fc Clock gear pin) Frequency = fc n 2 +8 [Hz] : fc/1 fc = 16 MHz (Output to SCL
Software reset state monitor at read 0 1 During software reset Initial data
Acknowledge mode selection 0 1 Not generate clock pulse for acknowledge signal Generate clock for acknowledge signal
Select number of bits transferred = 0 Number of clock pulses 8 1 2 3 4 5 6 7 Data length = 1 Number of clock pulses 9 2 3 4 5 6 7 8 Data length
000 001 010 011 100 101 110 111 Note 1: Note 2: Note 3:
8 1 2 3 4 5 6 7
8 1 2 3 4 5 6 7
Set the to "000" before switching to a clocked-synchronous 8-bit SIO mode. For the frequency of the SCL line clock, see section 3.11.5 (3) "Serial clock". Initial data of SCK0 is "0", SWRMON is "1".
Note 4: This I2C bus circuit does not support fast mode, it supports standard mode only. The fscl speed can be selected over 100kbps by fc and , however it's irregular operation.
Figure 3.11.5 Register for I C Bus Mode (SBI1, SBI1CR1)
2
92CM27-264
2005-04-20
TMP92CM27
Serial Bus Interface Control Register 2 7
SBI0CR2 (1243H) Bit symbol Read/Write After reset Readmodify-write instruction is prohibited. Function 0 Master/ slave selection 0 MST
6
TRX W
5
BB 0
4
PIN 1 Release INTSBI0 interrupt request
3
SBIM1 W (Note 1)
2
SBIM0
1
SWRST1 W (Note 1)
0
SWRST0
Transmitter/ Start/stop condition receiver generation selection
0 0 Serial bus interface operation mode selection (Note 2) 00: Port mode 01: SIO mode 10: I2C bus mode 11: (Reserved)
0 0 Software reset control write "10" and "01" in order, then an internal software reset signal is generated.
Serial bus interface operating mode selection (Note 2) 00 01 10 11 Port mode (Serial bus interface output disabled) Clocked-synchronous 8-bit SIO mode I2C bus mode (Reserved)
INTSBI0 interrupt request 0 1 - Release interrupt request
Start/stop condition generation 0 1 Generates the stop condition Generates the start condition
Transmitter/receiver selection 0 1 Receiver Transmitter
Master/slave selection 0 1 Slave Master
Note 1: Note 2:
Reading this register function as SBI0SR register. Switch a mode to port mode after confirming that the bus is free. Switch a mode between I2C bus mode and clocked-synchronous 8-bit SIO mode after confirming that input signals via port are high level.
2
Figure 3.11.6 Register for I C Bus Mode (SBI0, SBI0CR2)
92CM27-265
2005-04-20
TMP92CM27
Serial Bus Interface Control Register 2 7
SBI1CR2 (124BH) Bit symbol Read/Write After reset Readmodify-write instruction is prohibited. Function 0 Master/ slave selection 0 MST
6
TRX W
5
BB 0
4
PIN 1 Release INTSBI1 interrupt request
3
SBIM1 W (Note 1)
2
SBIM0
1
SWRST1 W (Note 1)
0
SWRST0
Transmitter/ Start/stop condition receiver generation selection
0 0 Serial bus interface operation mode selection (Note 2) 00: Port mode 01: SIO mode 10: I2C bus mode 11: (Reserved)
0 0 Software reset control write "10" and "01" in order, then an internal software reset signal is generated.
Serial bus interface operating mode selection (Note 2) 00 01 10 11 Port mode (Serial bus interface output disabled) Clocked-synchronous 8-bit SIO mode I2C bus mode (Reserved)
INTSBI1 interrupt request 0 1 - Release interrupt request
Start/stop condition generation 0 1 Generates the stop condition Generates the start condition
Transmitter/receiver selection 0 1 Receiver Transmitter
Master/slave selection 0 1 Slave Master
Note 1: Note 2:
Reading this register function as SBI1SR register. Switch a mode to port mode after confirming that the bus is free. Switch a mode between I2C bus mode and clocked-synchronous 8-bit SIO mode after confirming that input signals via port are high level.
2
Figure 3.11.7 Register for I C Bus Mode (SBI1, SBI1CR2)
92CM27-266
2005-04-20
TMP92CM27
Serial Bus Interface Status Register 7
SBI0SR (1243H) Bit symbol Read/Write After reset ReadFunction modify-write instruction is prohibited. 0 Master/ slave status selection monitor 0 0 1 INTSBI0 interrupt request monitor Transmitter/ I2C bus receiver status status monitor selection monitor MST
6
TRX
5
BB
4
PIN R
3
AL 0 Arbitration lost detection monitor 0: - 1: Detected
2
AAS 0
Slave address match detection monitor 0: Undetected 1: Detected
1
AD0 0
GENERAL CALL detection monitor 0: Undetected 1: Detected
0
LRB 0 Last received bit monitor 0: "0" 1: "1"
Last received bit monitor 0 1 Last received bit was "0". Last received bit was "1".
GENERAL CALL detection monitor 0 1 Undetected GENERAL CALL detected
Slave address match detection monitor 0 1 Undetected Slave address match or GENERAL CALL detected
Arbitration lost detection monitor 0 1 - Arbitration lost
INTSBI0 interrupt request monitor 0 Interrupt requested 1 Interrupt released
I2C bus status monitor 0 1 Free Busy
Transmitter/receiver status monitor 0 1 Receiver Transmitter
Master/slave status monitor 0 1 Slave Master
Note: Writing in this register functions as SBI0CR2.
Figure 3.11.8 Register for I C Bus Mode (SBI0, SBI0SR)
2
92CM27-267
2005-04-20
TMP92CM27
Serial Bus Interface Status Register 7
SBI1SR (124BH) Bit symbol Read/Write After reset ReadFunction modify-write instruction is prohibited. 0 Master/ slave status selection monitor 0 0 1 INTSBI1 interrupt request monitor Transmitter/ I2C bus receiver status status monitor selection monitor MST
6
TRX
5
BB
4
PIN R
3
AL 0 Arbitration lost detection monitor 0: - 1: Detected
2
AAS 0
Slave address match detection monitor 0: Undetected 1: Detected
1
AD0 0
GENERAL CALL detection monitor 0: Undetected 1: Detected
0
LRB 0 Last received bit monitor 0: "0" 1: "1"
Last received bit monitor 0 1 Last received bit was "0". Last received bit was "1".
GENERAL CALL detection monitor 0 1 Undetected GENERAL CALL detected
Slave address match detection monitor 0 1 Undetected Slave address match or GENERAL CALL detected
Arbitration lost detection monitor 0 1 - Arbitration lost
INTSBI1 interrupt request monitor 0 Interrupt requested 1 Interrupt released
I2C bus status monitor 0 1 Free Busy
Transmitter/receiver status monitor 0 1 Receiver Transmitter
Master/slave status monitor 0 1 Slave Master
Note: Writing in this register functions as SBI1CR2.
Figure 3.11.9 Register for I C Bus Mode (SBI1, SBI1SR)
2
92CM27-268
2005-04-20
TMP92CM27
Serial Bus Interface Baud Rate Register 0 7
SBI0BR0 (1244H) Bit symbol Read/Write After reset - W 0 Always write "0".
6
I2SBI0 R/W 0 IDLE2 0: Stop 1: Run
5
4
3
2
1
0
ReadFunction modify-write instruction is prohibited.
Operation during IDLE 2 mode 0 Stop 1 Run
Serial Bus Interface Baud Rate Register 1 7
SBI0BR1 (1245H) Bit symbol Read/Write After reset P4EN W 0 Internal clock 0: Stop 1: Run
6
- W 0 Always write "0".
5
4
3
2
1
0
Readmodify-write Function instruction is prohibited.
Internal baud rate circuit control 0 Stop 1 Run
Sirial Bus Interface Data Buffer Register 7
SBI0DBR (1241H) Readmodify-write instruction is prohibited. Bit symbol Read/Write After reset DB7
6
DB6
5
DB5
4
DB4
3
DB3
2
DB2
1
DB1
0
DB0
R (Receiving)/W (Transmission) Undefined
Note 1: When writing transmission data, start from the MSB (Bit7). Receiving data is placed from LSB (Bit0). Note 2: SBI0DBR can't be read the written data. Therefore read-modify-write instruction (e.g., "BIT" instruction) is prohibited. Note 3: Written data in SBI0DBR is cleared by INTSBI0 signal.
I C Bus Address Register 7
I2C0AR (1242H) Bit symbol Read/Write After reset ReadFunction modify-write instruction is prohibited. 0 0 0 0 SA6
2
6
SA5
5
SA4
4
SA3 W
3
SA2 0
2
SA1 0
1
SA0 0
0
ALS 0 Address recognition mode specification
Slave address selection for when device is operating as slave device
Address recognition mode specification 0 1 Slave address recognition Non slave address recognition
Figure 3.11.10 Register for I C Bus Mode (SBI0, SBI0BR0, SBI0BR1, SBI0DBR, I2C0AR)
2
92CM27-269
2005-04-20
TMP92CM27
Serial Bus Interface Baud Rate Register 0 7
SBI1BR0 (124CH) Bit symbol Read/Write After reset - W 0 Always write "0".
6
I2SBI0 R/W 0 IDLE2 0: Stop 1: Run
5
4
3
2
1
0
ReadFunction modify-write instruction is prohibited.
Operation during IDLE 2 mode 0 Stop 1 Run
Serial Bus Interface Baud Rate Register 1 7
SBI1BR1 (124DH) Bit symbol Read/Write After reset P4EN W 0 Internal clock 0: Stop 1: Run
6
- W 0 Always write "0".
5
4
3
2
1
0
Readmodify-write Function instruction is prohibited.
Internal baud rate circuit control 0 Stop 1 Run
Sirial Bus Interface Data Buffer Register 7
SBI1DBR (1249H) Readmodify-write instruction is prohibited. Bit symbol Read/Write After reset DB7
6
DB6
5
DB5
4
DB4
3
DB3
2
DB2
1
DB1
0
DB0
R (Receiving)/W (Transmission) Undefined
Note 1: When writing transmission data, start from the MSB (Bit7). Receiving data is placed from LSB (Bit0). Note 2: SBI1DBR can't be read the written data. Therefore read-modify-write instruction (e.g., "BIT" instruction) is prohibited. Note 3: Written data in SBI1DBR is cleared by INTSBI1 signal.
I C Bus Address Register 7
I2C1AR (124AH) Bit symbol Read/Write After reset ReadFunction modify-write instruction is prohibited. 0 0 0 0 SA6
2
6
SA5
5
SA4
4
SA3 W
3
SA2 0
2
SA1 0
1
SA0 0
0
ALS 0 Address recognition mode specification
Slave address selection for when device is operating as slave device
Address recognition mode specification 0 1 Slave address recognition Non slave address recognition
Figure 3.11.11 Register for I C Bus Mode (SBI1, SBI1BR0, SBI1BR1, SBI1DBR, I2C1AR)
2
92CM27-270
2005-04-20
TMP92CM27
3.11.5
Control in I2C Bus Mode
(1) Acknowledge mode specification Set the SBI0CR1 to 1 for operation in the acknowledge mode. The TMP92CM27 generates an additional clock pulse for an acknowledge signal when operating in master mode. In the transmitter mode during the clock pulse cycle, the SDA0 pin is released in order to receive the acknowledge signal from the receiver. In the receiver mode during the clock pulse cycle, the SDA0 pin is set to the low in order to generate the acknowledge signal. Clear the to 0 for operation in the non-acknowledge mode, the TMP92CM27 does not generate a clock pulse for the acknowledge signal when operating in the master mode.
(2) Select number of transfer bits The SBI0CR1 is used to select a number of bits for next transmission/ receiving data. Since the is cleared to 000 as a start condition, a slave address and direction bit are transferred in 8 bits. Other than these, the retains a specified value. (3) Serial clock 1. Clock source The SBI0CR1 is used to select a maximum transfer frequency outputted on the SCL pin in master mode. Set the baud rates, which have been calculated according to the formula below, to meet the specifications of the I2C bus, such as the smallest pulse width of tLOW.
tHIGH tLOW 1/fscl
tLOW = 2n - 1/fSBI tHIGH = 2 n - 1/fSBI + 8/fSBI fscl = 1/(tLOW + tHIGH) = fSBI 2n + 8
SBI0CR1 000 001 010 011 100 101 110
n 5 6 7 8 9 10 11
Note1: fSBI shows fSYS. Note2: In a setup of prescaler of SYSCR0, the fc/16 mode cannot be used at the time of SBI circuit use.
Figure 3.11.12 Clock Source
92CM27-271
2005-04-20
TMP92CM27
2. Clock synchronization In the I2C bus mode, in order to wired-AND a bus, a master device which pulls down a clock line to low level, in the first place, invalidate a clock pulse of another master device which generates a high-level clock pulse. The master device with a high-level clock pulse needs to detect the situation and implement the following procedure. The TMP92CM27 has a clock synchronization function for normal data transfer even when more than one master exists on the bus. The example explains the clock synchronization procedures when two masters simultaneously exist on a bus.
Wait counting high-level width of a clock pulse Start couting high-level width of a clock pulse Internal SCL output (Master A) Internal SCL output (Master B) SCL line a b c
Reset a counter of high-level width of a clock pulse
Figure 3.11.13 Clock Synchronization As master A pulls down the internal SCL output to the low level at point "a", the SCL line of the bus becomes the low level. After detecting this situation, master B resets a counter of high-level width of an own clock pulse and sets the internal SCL output to the low level. Master A finishes counting low-level width of an own clock pulse at point "b" and sets the internal SCL output to the high level. Since master B holds the SCL line of the bus at the low level, master A waits for counting high-level width of an own clock pulse. After master B finishes counting low-level width of an own clock pulse at point "c" and master A detects the SCL line of the bus at the high level, and starts counting high level of an own clock pulse. The clock pulse on the bus is determined by the master device with the shortest high-level width and the master device with the longest low-level width from among those master devices connected to the bus. (4) Slave address and address recognition mode specification When the TMP92CM27 is used as a slave device, set the slave address and to the I2C0AR. Clear the to "0" for the address recognition mode. (5) Master/slave selection Set the SBI0CR2 to "1" for operating the TMP92CM27 as a master device. Clear the SBI0CR2 to "0" for operation as a slave device. The is cleared to "0" by the hardware after a stop condition on the bus is detected or arbitration is lost.
92CM27-272
2005-04-20
TMP92CM27
(6) Transmitter/receiver selection Set the SBI0CR2 to "1" for operating the TMP92CM27 as a transmitter. Clear the to "0" for operation as a receiver. In slave mode, when transfer data in addressing format, when received slave address is same value with setting value to I2C0AR, or GENERAL CALL is received (All 8-bit data are "0" after a start condition), the is set to "1" by the hardware if the direction bit (R/ W ) sent from the master device is "1", and is cleared to "0" by the hardware if the bit is "0". In the master mode, after an acknowledge signal is returned from the slave device, the is cleared to "0" by the hardware if a transmitted direction bit is "1", and is set to "1" by the hardware if it is "0". When an acknowledge signal is not returned, the current condition is maintained. The is cleared to "0" by the hardware after a stop condition on the bus is detected or arbitration is lost. (7) Start/stop condition generation When programmed "1111" to SBI0CR2 in during SBI0SR is "0", slave address and direction bit which are set to SBI0DBR and start condition are output on a bus. And it is necessary to set transmitted data to the data buffer register (SBI0DBR) and set "1" to beforehand.
SCL line SDA line Start condition 1 A6 2 A5 3 A4 4 A3 5 A2 6 A1 7 A0 8 R/ W Acknowledge signal 9
Slave address and direction bit
Figure 3.11.14 Generation of Start Condition and Slave Address When programmed "0" to SBI0CR2 and "111" to in during SBI0SR is "1", start a sequence of stop condition output. Do not modify the contents of until a stop condition is generated on a bus.
SCL line SDA line Stop condition
Figure 3.11.15 Generation of Stop Condition The state of the bus can be ascertained by reading the contents of SBI0SR. SBI0SR will be set to 1 (Bus busy status) if a start condition has been detected on the bus, and will be cleared to 0 if a stop condition has been detected (Bus free status). In addition, since there is a restrictions matter about stop condition generating in master mode, please refer to 3.11.6.(4) " Stop condition generation ".
92CM27-273
2005-04-20
TMP92CM27
(8) Interrupt service requests and interrupt cancellation When a serial bus interface interrupt request 0 (INTSBI0) occurs, the SBI0SR2 is cleared to "0". During the time that the SBI0SR2 is "0", the SCL line is pulled down to the low level. The is cleared to "0" when end of transmission or receiving 1 word of data. And when writing data to SBI0DBR or reading data from SBI0DBR, is set to "1". The time from the being set to "1" until the SCL line is released takes tLOW. In the address recognition mode ( = 0), is cleared to "0" when the received slave address is the same as the value set at the I2C0AR or when a GENERAL CALL is received (All 8-bit data are "0" after a start condition). Although SBI0CR2 can be set to "1" by the program, the is not clear it to "0" when it is programmed "0". (9) Serial bus interface operation mode selection SBI0CR2 is used to specify the serial bus interface operation mode. Set SBI0CR2 to "10" when the device is to be used in I2C bus mode after confirming pin condition of serial bus interface to "H". Switch a mode to port after confirming a bus is free. (10) Arbitration lost detection monitor Since more than one master device can exist simultaneously on the bus in I2C bus mode, a bus arbitration procedure has been implemented in order to guarantee the integrity of transferred data. Data on the SDA line is used for I2C bus arbitration. The following shows an example of a bus arbitration procedure when two master devices exist simultaneously on the bus. Master A and master B output the same data until point "a". After master A outputs "L" and master B, "H", the SDA line of the bus is wire-AND and the SDA line is pulled down to the low level by master A. When the SCL line of the bus is pulled up at point b, the slave device reads the data on the SDA line, that is, data in master A. A data transmitted from master B becomes invalid. The state in master B is called "ARBITRATION LOST". Master B device that loses arbitration releases the internal SDA output in order not to affect data transmitted from other masters with arbitration. When more than one master sends the same data at the first word, arbitration occurs continuously after the second word.
SCL (Line) Internal SDA output (Master A) Internal SDA output (Master B) SDA line a b Set internal SDA output to "1" after arbitration has been lost.
Figure 3.11.16 Arbitration Lost
92CM27-274
2005-04-20
TMP92CM27
The TMP92CM27 compares the levels on the bus's SDA line with those of the internal SDA output on the rising edge of the SCL line. If the levels do not match, arbitration is lost and SBI0SR is set to "1". When SBI0SR is set to "1", SBI0SR are cleared to "00" and the mode is switched to slave receiver mode. Thus, clock output is stopped in data transfer after setting = "1". SBI0SR is cleared to "0" when data is written to or read from SBI0DBR or when data is written to SBI0CR2.
Internal SCL Master output A Internal SDA output Internal SCL Master output B Internal SDA output 1 2 3 4 5 6 7 8 9 1 2 3 4
D7A
D6A
D5A
D4A
D3A
D2A
D1A
D0A
D7A'
D6A'
D5A'
D4A'
Stop the clock pulse 1 2 3 4
D7B
D6B
Keep internal SDA output to high level as losing arbitration
Accessed to SBI0DBR or SBI0CR2
Figure 3.11.17 Example of when TMP92CM27 is a Master Device B (D7A = D7B, D6A = D6B) (11) Slave address match detection monitor SBI0SR operates following in during slave mode; In address recognition mode (e.g., when I2C0AR = "0"), when received GENERAL CALL or same slave address with value set to I2C0AR, SBI0SR is set to "1". When = "1", SBI0SR is set to "1" after the first word of data has been received. SBI0SR is cleared to "0" when data is written to SBI0DBR or read from SBI0DBR. (12) GENERAL CALL detection monitor SBI0SR operates following in during slave mode; when received GENERAL CALL (all 8-bit data is "0", after a start condition), SBI0SR is set to "1". And SBI0SR is cleared to "0" when a start condition or stop condition on the bus is detected. (13) Last received bit monitor The value on the SDA line detected on the rising edge of the SCL line is stored in the SBI0SR. In the acknowledge mode, immediately after an INTSBI0 interrupt request has been generated, an acknowledge signal is read by reading the contents of the SBI0SR.
92CM27-275
2005-04-20
TMP92CM27
(14) Software reset function The software reset function is used to initialize the SBI circuit, when SBI is rocked by external noises, etc. When write first "10" next "01" to SBI0CR2, reset signal is inputted to serial bus interface circuit, and circuit is initialized. All command registers except SBI0CR2 and status flag except SBI0CR2 are initialized to value of just after reset. SBI0CR1 is set to "1" automatically when completed initialization of serial bus interface. (15) Serial bus interface data buffer register (SBI0DBR) The received data can be read and transmission data can be written by reading or writing SBI0DBR. In the master mode, after the slave address and the direction bit are set in this register, the start condition is generated. (16) I2C bus address register (I2C0AR) I2C0AR is used to set the slave address when the TMP92CM27 functions as a slave device. The slave address outputted from the master device is recognized by setting the I2C0AR to "0". And, the data format becomes the addressing format. When set to "1", the slave address is not recognized, the data format becomes the free data format. (17) Baud rate register (SBI0BR1) Write "1" to baud rate circuit control register SBI0BR1 before using I2C bus. (18) Setting register for IDLE2 mode operation (SBI0BR0) SBI0BR0 is the register setting operation/stop during IDLE2 mode. Therefore, setting is necessary before the HALT instruction is executed.
92CM27-276
2005-04-20
TMP92CM27
3.11.6
Data Transfer in I2C Bus Mode
(1) Device initialization In first, set the SBI0BR1, SBI0CR1. Set SBI0BR1 to "1" and clear bits 7 to 5 and 3 in the SBI0CR1 to "0". Next, set a slave address and the ( = "0" when an addressing format) to the I2C0AR. And, write "000" to SBI0CR2, "1" to , "10" to and "00" to . Set initialization status to slave receiver mode by this setting. (2) Start condition and slave address generation 1. Master mode In the master mode, the start condition and the slave address are generated as follows. In first, check a bus free status (when SBI0SR = "0"). Set the SBI0CR1 to "1" (Acknowledge mode) and specify a slave address and a direction bit to be transmitted to the SBI0DBR. When SBI0SR = "0", the start condition are generated by writing "1111" to SBI0CR2. Subsequently to the start condition, nine clocks are output from the SCL pin. While eight clocks are output, the slave address and the direction bit which are set to the SBI0DBR. At the 9th clock, the SDA line is released and the acknowledge signal is received from the slave device. An INTSBI interrupt request generate at the falling edge of the 9th clock. The is cleared to "0". In the master mode, the SCL pin is pulled down to the low level while is "0". When an interrupt request is generated, the is changed according to the direction bit only when an acknowledge signal is returned from the slave device. 2. Slave mode In the slave mode, the start condition and the slave address are received. After the start condition is received from the master device, while eight clocks are output from the SCL pin, the slave address and the direction bit that are output from the master device are received. When a GENERAL CALL or the same address as the slave address set in I2C0AR is received, the SDA line is pulled down to the low level at the 9th clock, and the acknowledge signal is output. An INTSBI0 interrupt request is generated on the falling edge of the 9th clock. The is cleared to "0". In slave mode the SCL line is pulled down to the low level while the = "0".
92CM27-277
2005-04-20
TMP92CM27
SCL line SDA line
1 A6 Start condition
2 A5
3 A4
4 A3
5 A2
6 A1
7 A0
8 R/ W
9 ACK Acknowledge signal from a slave device
Slave address + Direction bit
INTSBI0 interrupt request Output of master Output of slave
Figure 3.11.18 Start Condition and Slave Address Generation (3) 1-word data transfer Check the by the INTSBI0 interrupt process after the 1-word data transfer is completed, and determine whether the mode is a master or slave. 1. If = "1" (Master mode) Check the and determine whether the mode is a transmitter or receiver. When the = "1" (Transmitter mode) Check the . When is "1", a receiver does not request data. Implement the process to generate a stop condition (Refer to 3.11.6 (4)) and terminate data transfer. When the is "0", the receiver is requests new data. When the next transmitted data is 8 bits, write the transmitted data to SBI0DBR. When the next transmitted data is other than 8 bits, set the and write the transmitted data to SBI0DBR. After written the data, becomes "1", a serial clock pulse is generated for transferring a new 1-word of data from the SCL0 pin, and then the 1-word data is transmitted. After the data is transmitted, an INTSBI0 interrupt request generates. The becomes "0" and the SCL0 line is pulled down to the low level. If the data to be transferred is more than one word in length, repeat the procedure from the checking above.
SCL0 Pin 1 2 3 4 5 6 7 8 9
Write to SBI0DBR SDA0 Pin D7 D6 D5 D4 D3 D2 D1 D0 ACK Acknowledge signal from a receive INTSBI0 interrupt request
Output of master Output of slave
Figure 3.11.19 Example in which = "000" and = "1" (Transmitter mode)
92CM27-278
2005-04-20
TMP92CM27
When the is "0" (Receiver mode) When the next transmitted data is other than 8 bits, set and read the received data from SBI0DBR to release the SCL0 line (Data which is read immediately after a slave address is sent is undefined). After the data is read, becomes "1". Serial clock pulse for transferring new 1 word of data is defined SCL and outputs "L" level from SDA0 pin with acknowledge timing. An INTSBI0 interrupt request then generates and the becomes "0", Then the TMP92CM27 pulls down the SCL pin to the low level. The TMP92CM27 outputs a clock pulse for 1 word of data transfer and the acknowledge signal each time that received data is read from the SBI0DBR.
SCL0 line 1 2 3 4 5 6 7 8 9 Read receiving data SDA0 line D7 D6 D5 D4 D3 D2 D1 D0 ACK New D7
Acknowledge signal to a transmitter
INTSBI0 interrupt request
Output of master Output of slave
Figure 3.11.20 Example of when = "000", = "1" (Receiver mode) In order to terminate the transmission of data to a transmitter, clear to "0" before reading data which is 1 word before the last data to be received. The last data word does not generate a clock pulse as the acknowledge signal. After the data has been transmitted and an interrupt request has been generated, set to "001" and read the data. The TMP92CM27 generates a clock pulse for a 1-bit data transfer. Since the master device is a receiver, the SDA0 line on the bus remains high. The transmitter receives the high signal as an ACK signal. The receiver indicates to the transmitter that the data transfer is completed. After the one data bit has been received and an interrupt request has been generated, the TMP92CM27 generates a stop condition (See section 3.11.6 (4)) and terminates data transfer.
SCL0 9 1 2 3 4 5 6 7 8 1
SDA0
D7
D6
D5
D4
D3
D2
D1
D0 Acknowledge signal "H" to transmitter
INTSBI0 interrupt request
After clear to "0", reading receiving data.
After set "001" to , reading receiving data. Output of master Output of slave
Figure 3.11.21 Termination of Data Transfer (Master receiver mode)
92CM27-279
2005-04-20
TMP92CM27
2. If = 0 (Slave mode) In the slave mode the TMP92CM27 operates either in normal slave mode or in slave mode after losing arbitration. In the slave mode, an INTSBI0 interrupt request generate when the TMP92CM27 receives a slave address or a GENERAL CALL from the master device, or when a GENERAL CALL is received and data transfer is completed, or after matching received address. In the master mode, the TMP92CM27 operates in a slave mode if it losing arbitration. An INTSBI0 interrupt request is generated when a word data transfer terminates after losing arbitration. When an INTSBI0 interrupt request is generated the is cleared to "0" and the SCL pin is pulled down to the low level. Either reading/writing from/to the SBI0DBR or setting the to "1" will release the SCL pin after taking tLOW time. Check the SBI0SR, , , and and implements processes according to conditions listed in the next table. Table 3.11.1 Operation in the Slave Mode
1

1

1

0
Conditions
Process
The TMP92CM27 detects arbitration lost Set the number of bits of single word to when transmitting a slave address, and , and write the transmit data to SBI0DBR. receives a slave address for which the value of the direction bit sent from another master is "1". In salve receiver mode, the TMP92CM27 receives a slave address for which the value of the direction bit sent from the master is "1". In salve transmitter mode, transmission of Check the , If is set to "1", data of single word is terminated. set to "1", reset "0" to and release the bus for the receiver no request next data. If was cleared to "0", set bit number of single word to and write the transmit data to SBI0DBR for the receiver requests next data. The TMP92CM27 detects arbitration lost Read the SBI0DBR for setting the when transmitting a slave address, and to "1" (Reading dummy data) or set the receives a slave address or GENERAL to "1". CALL for which the value of the direction bit sent from another master is "0". The TMP92CM27 detects arbitration lost when transmitting a slave address or data, and transfer of word terminates. In slave receiver mode the TMP92CM27 receives a slave address or GENERAL CALL for which the value of the direction bit sent from the master is "0". In slave receiver mode the TMP92CM27 Set bit number of single word to terminates receiving word data. , and read the receiving data from SBI0DBR.
0
1
0
0
0
0
1
1
1/0
0
0
0
1
1/0
0
1/0
92CM27-280
2005-04-20
TMP92CM27
(4) Stop condition generation When SBI0SR = 1, the sequence for generating a stop condition is started by writing "111" to SBI0CR2 and "0" to SBI0CR2. Do not modify the contents of SBI0CR2 until a stop condition has been generated on the bus. When the bus's SCL line has been pulled low by another device, the TMP92CM27 generates a stop condition when the other device has released the SCL line and SDA0 pin rising.
"1" "1" "0" "1" Internal SCL Stop condition
SCL0 pin SDA0 pin
(Read)
Figure 3.11.22 Stop Condition Generation (Single master)
"1" "1" "0" "1" Internal SCL The case of pulled low by another device SCL0 pin
Stop condition
SDA0 pin

(Read)
Figure 3.11.23 Stop Condition Generation (Multi master)
92CM27-281
2005-04-20
TMP92CM27
(5) Restart Restart is used during data transfer between a master device and a slave device to change the data transfer direction. The following description explains how to restart when this device is in the master mode. Clear the SBI0CR2 to "000" and set the SBI0CR2 to "1" to release the bus. The SDA0 line remains the high level and the SCL0 pin is released. Since a stop condition is not generated on the bus, other devices assume the bus to be in a busy state. Check the SBI0SR until it becomes "0" to check that the SCL0 pin of this device is released. Check the until it becomes 1 to check that the SCL line on a bus is not pulled down to the low level by other devices. After confirming that the bus stays in a free state, generate a start condition with procedure described in 3.11.6 (2). In order to meet setup time when restarting, take at least 4.7 s of waiting time by software from the time of restarting to confirm that the bus is free until the time to generate the start condition.
"0" "0" "0" "1" "1" "1" "1" "1" 4.7 s (Min) SCL (bus) SCL0 pin SDA0 pin 9 Start condition
Figure 3.11.24 Timing Diagram when Restarting
92CM27-282
2005-04-20
TMP92CM27
3.11.7
Clocked-synchronous 8-bit SIO Mode Control
The following registers are used to control and monitor the operation status when the serial bus interface (SBI) is being operated in clocked synchronous 8-bit SIO mode. Serial Bus Interface 0 Control Register 1 7 6
SIOINH W 0 Transfer start 0: Stop 1: Start 0 Continue/ abort transfer 0: Continue transfer 1: Abort transfer 0 0 Transfer mode select
00: Transmit mode 01: (Reserved) 10: Transmit/receive mode 11: Receive mode
5
SIOM1
4
SIOM0
3
2
SCK2 W 0
1
SCK1 0
0
SCK0 W 0
SBI0CR1 (1240H)
Bit symbol Read/Write After reset Function
SIOS
Readmodify-write instruction is prohibited.
Serial clock selection and reset monitor
Serial clock selection at write 000 001 010 011 100 101 111 n=4 n=5 n=6 n=7 n=8 n=9 - 1 MHz 500 kHz 250 kHz 125 kHz 62.5 kHz 31.25 kHz System clock: fc fc = 16 MHz (SCL output to SCK pin) fscl= fc [Hz] 2n
110 n = 10 15.625 kHz (External clock : SCK0)
Transfer mode selection 00 01 10 11 8-bit transmit mode (Reserved) 8-bit transmit/receive mode 8-bit receive mode
Continue/abort transfer 0 1 Continue transfer Abort transfer (Automatically cleared after transfer aborted)
Indicate transfer start/stop 0 1 Stop Start
Note: Set the transfer mode and the serial clock after setting to "0" and to "1".
Serial Bus Interface 0 Data Buffer Register 7
SBI0DBR Bit symbol (1241H) Read/Write Readmodify-write After reset instruction is prohibited. DB7
6
DB6
5
DB5
4
DB4
3
DB3
2
DB2
1
DB1
0
DB0
R (Receiver)/W (Transfer) Undefined
Figure 3.11.25 Register for the SIO Mode (SBI0, SBI0CR1, SBI0DBR)
92CM27-283
2005-04-20
TMP92CM27
Serial Bus Interface 1 Control Register 1 7
SBI1CR1 (1248H) Bit symbol Read/Write After reset Readmodify-write instruction is prohibited. Function 0 Transfer start 0: Stop 1: Start 0 Continue/ abort transfer 0: Continue transfer 1: Abort transfer SIOS
6
SIOINH W
5
SIOM1
4
SIOM0
3
2
SCK2 W 0
1
SCK1 0
0
SCK0 W 0
0 0 Transfer mode select
00: Transmit mode 01: (Reserved) 10: Transmit/receive mode 11: Receive mode
Serial clock selection and reset monitor
Serial clock selection at write 000 001 010 011 100 101 111 n=4 n=5 n=6 n=7 n=8 n=9 - 1 MHz 500 kHz 250 kHz 125 kHz 62.5 kHz 31.25 kHz fscl= f 2n [Hz] System clock: fc fc = 16MHz (SCL output to SCK pin)
110 n = 10 15.625 kHz
(External clock : SCK0)
Transfer mode selection 00 01 10 11 8-bit transmit mode (Reserved) 8-bit transmit/receive mode 8-bit receive mode
Continue/abort transfer 0 1 Continue transfer Abort transfer (Automatically cleared after transfer aborted)
Indicate transfer start/stop 0 1 Stop Start
Note: Set the transfer mode and the serial clock after setting to "0" and to "1".
Serial Bus Interface 1 Data Buffer Register 7
SBI1DBR Bit symbol (1249H) Read/Write Readmodify-write After reset instruction is prohibited. DB7
6
DB6
5
DB5
4
DB4
3
DB3
2
DB2
1
DB1
0
DB0
R (Receiver)/W (Transfer) Undefined
Figure 3.11.26 Register for the SIO Mode(SBI1, SBI1CR1, SBI1DBR)
92CM27-284
2005-04-20
TMP92CM27
Serial Bus Interface 0 Control Register 2 7
SBI0CR2 (1243H) Bit symbol Read/Write After reset ReadFunction modify-write instruction is prohibited.
6
5
4
3
SBIM1 W
2
SBIM0
1
- W 0 (Note 2)
0
- W 0 (Note 2)
0 0 Serial bus interface operation mode selection 00: Port mode 01: SIO mode 10: I2C bus mode 11: (Reserved)
Note 1: Set the SBI0CR1 to "000" before switching to a clocked-synchronous 8-bit SIO mode Note 2: Please always write "00" to SBI0CR2<1:0>.
Serial bus interface operation mode selection 00 01 10 11 Port mode (Serial bus interface output disabled) Clocked-synchronous 8-bit SIO mode I2C bus mode (Reserved)
Serial Bus Interface 0 Status Register 7
SBI0SR (1243H) Bit symbol Read/Write After reset Function 0 Serial transfer operation status monitor
6
5
4
3
SIOF R
2
SEF 0 Shift operation status monitor
1
0
Serial transfer operating status monitor 0 1 Transfer terminated Transfer in progress
Shift operation status monitor 0 1 Shift operation terminated Shift operation in progress
Serial Bus Interface 0 Baud Rate Register 0 7
SBI0BR0 (1244H) Bit symbol Read/Write After reset - W 0
6
I2SBI0 R/W 0
5
4
3
2
1
0
Readmodify-write Function instruction is prohibited.
Always write IDLE2 "0". 0: Stop 1: Operate Operation in IDLE2 mode
Note:
Clocked-syncronous mode cannot operate in IDLE2 mode.
0 1
Stop Operate
Serial Bus Interface 0 Baud Rate Register 1 7
SBI0BR1 (1245H) Bit symbol Read/Write P4EN W 0 Internal clock 0: Stop 1: Operate
6
- W 0 Always write "0".
5
4
3
2
1
0
After reset Readmodify-write Function instruction is prohibited.
Baud rate clock control 0 1 Stop Operate
Figure 3.11.27 Register for the SIO Mode (SBI0, SBI0CR2, SBI0SR, SBI0BR0, SBI0BR1)
92CM27-285
2005-04-20
TMP92CM27
Serial Bus Interface 1 Control Register 2 7
SBI1CR2 (124BH) Bit symbol Read/Write After reset ReadFunction modify-write instruction is prohibited.
6
5
4
3
SBIM1 W
2
SBIM0
1
- W 0 (Note 2)
0
- W 0 (Note 2)
0 0 Serial bus interface operation mode selection 00: Port mode 01: SIO mode 10: I2C bus mode 11: (Reserved)
Note 1: Set the SBI0CR1 to "000" before switching to a clocked-synchronous 8-bit SIO mode Note 2: Please always write "00" to SBICR2<1:0>.
Serial bus interface operation mode selection 00 01 10 11 Port mode (Serial bus interface output disabled) Clocked-synchronous 8-bit SIO mode I2C bus mode (Reserved)
Serial Bus Interface 1 Status Register 7
SBI1SR (124BH) Bit symbol Read/Write After reset Function 0 Serial transfer operation status monitor
6
5
4
3
SIOF R
2
SEF 0 Shift operation status monitor
1
0
Serial transfer operating status monitor 0 1 Transfer terminated Transfer in progress
Shift operation status monitor 0 1 Shift operation terminated Shift operation in progress
Serial Bus Interface 1 Baud Rate Register 0 7
SBI1BR0 (124CH) Bit symbol Read/Write - W 0
6
I2SBI0 R/W 0
5
4
3
2
1
0
After reset Readmodify-write Function instruction is prohibited.
Always write IDLE2 "0". 0: Stop 1: Operate Operation in IDLE2 mode
Note:
Clocked-syncronous mode cannot operate in IDLE2 mode.
0 1
Stop Operate
Serial Bus Interface 1 Baud Rate Register 1 7
SBI1BR1 (124DH) Bit symbol Read/Write After reset P4EN W 0 Internal clock 0: Stop 1: Operate
6
- W 0 Always write "0".
5
4
3
2
1
0
Readmodify-write Function instruction is prohibited.
Baud rate clock control 0 1 Stop Operate
Figure 3.11.28 Register for the SIO Mode (SBI1, SBI1CR2, SBI1SR, SBI1BR0, SBI1BR1)
92CM27-286
2005-04-20
TMP92CM27
(1) Serial Clock 1. Clock source SBI0CR1 is used to select the following functions: Internal clock In internal clock mode one of seven frequencies can be selected. The serial clock signal is output to the outside on the SCK0 pin. The SCK0 pin goes high when data transfer starts. When the device is writing (in transmit mode) or reading (in receive mode), data cannot follow the serial clock rate, so an automatic wait function is executed which automatically stops the serial clock and holds the next shift operation until reading or writing has been completed.
Automatic wait
SCK0 pin output SO0 pin output Writing transmission data a
1
2
3
7
8
1
2
6
7
8
1
2
3 c2
a0 a1 a2 a5 a6 a7
b0 b1 b4 b5 b6 b7 c0 c1 b c
Figure 3.11.29 Automatic Wait Function External clock ( = "111") An external clock input via the SCK0 pin is used as the serial clock. In order to ensure the integrity of shift operations, both the high and low-level serial clock pulse widths shown below must be maintained. The maximum data transfer frequency is 1MHz (when fC = 16 MHz).
SCK0 pin tSCKL tSCKH tSCKL1 and tSCKH > 8 / fc
Figure 3.11.30 Maximum Data Transfer Frequency when External Clock Input
92CM27-287
2005-04-20
TMP92CM27
2. Shift edge Data is transmitted on the leading edge of the clock and received on the trailing edge. Leading edge shift Data is shifted on the leading edge of the serial clock (on the falling edge of the SCK0 pin input/output). Trailing edge shift Data is shifted on the trailing edge of the serial clock (on the rising edge of the SCK0 pin input/output).
SCK0 pin SO0 pin Shift register
Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7
*******7
76543210 *7654321 **765432 ***76543 ****7654 *****765 ******76
(a) Leading shift
SCK0 pin SI0 pin Shift register
Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7
********
0*******
10****** 210***** 3210**** 43210*** 543210** 6543210* 76543210
(b) Trailing shift
*: Don't care
Figure 3.11.31 Shift Edge
92CM27-288
2005-04-20
TMP92CM27
(2) Transfer modes The SBI0CR1 is used to select a transmit, receive or transmit/receive mode. 1. 8-bit transmit mode Set a control register to a transmit mode and write transmission data to the SBI0DBR. After the transmit data has been written, set the SBI0CR1 to "1" to start data transfer. The transmitted data is transferred from the SBI0DBR to the shift register and output, starting with the least significant bit (LSB), via the SO0 pin and synchronized with the serial clock. When the transmission data has been transferred to the shift register, the SBI0DBR becomes empty. The INTSBI0 (Buffer empty) interrupt request is generated to request new data. When the internal clock is used, the serial clock will stop and the automatic wait function will be initiated if new data is not loaded to the data buffer register after the specified 8-bit data is transmitted. When new transmission data is written, the automatic wait function is canceled. When the external clock is used, data should be written to the SBI0DBR before new data is shifted. The transfer speed is determined by the maximum delay time between the time when an interrupt request is generated and the time when data is written to the SBI0DBR by the interrupt service program. When the transmit is started, after the SBI0SR goes "1" output from the SO0 pin holds final bit of the last data until falling edge of the SCK. For stopping data transmission, when the is cleared to "0" by the INTSBI0 interrupt service program or when the is set to "1". When the is cleared to "0", the transmitted mode ends when all data is output. In order to confirm whether data is being transmitted properly by the program, the to be sensed. The SBI0SR is cleared to "0" when transmission has been completed. When the is set to "1", transmitting datat stops. The turns "0". When the external clock is used, it is also necessary to clear the to "0" before new data is shifted; otherwise, dummy data is transmitted and operation ends.
92CM27-289
2005-04-20
TMP92CM27
Clear SCK0 pin (Output) SO0 pin INTSBI0 interrupt request SBI0DBR
a b
* a0
a1
a2
a3
a4
a5
a6
a7
b0
b1
b2
b3
b4
b5
b6
b7
Writing transmission data (a) Internal clock Clear SCK0 pin (Input) SO0 pin INTSBI0 interrupt request SBI0DBR
a b
* a0
a1
a2
a3
a4
a5
a6
a7
b0
b1
b2
b3
b4
b5
b6
b7
Writing transmission data (b) External clock
Figure 3.11.32 Transmission Mode
Example: Program to stop data transmission (when an external clock is used) STEST1 : STEST2 : BIT JR BIT JR LD SEF, (SBI0SR) NZ, STEST1 0, (PN) Z, STEST2 (SBI0CR1), 00000111B ; If = 1 then loop. ; If SCK = 0 then loop. ; 0
92CM27-290
2005-04-20
TMP92CM27
SCK0 pin SO0 pin
Bit6 Bit7
tSODH = 3.5/fFPH [s] (Min)
Figure 3.11.33 Transmission Data Hold Time at End Transmit 2. 8-bit receive mode Set the control register to receive mode and set the SBI0CR1 to "1" for switching to receive mode. Data is received into the shift register via the SI0 pin and synchronized with the serial clock, starting from the least significant bit (LSB). When the 8-bit data is received, the data is transferred from the shift register to the SBI0DBR. The INTSBI0 (Buffer full) interrupt request is generated to request that the received data be read. The data is then read from the SBI0DBR by the interrupt service program. When the internal clock is used, the serial clock will stop and the automatic wait function will be in effect until the received data is read from the SBI0DBR. When the external clock is used, since shift operation is synchronized with an external clock pulse, the received data should be read from the SBI0DBR before the next serial clock pulse is input. If the received data is not read, further data to be received is canceled. The maximum transfer speed when an external clock is used is determined by the delay time between the time when an interrupt request is generated and the time when the received data is read. Receiving of data ends when the is cleared to "0" by the INTSBI0 interrupt service program or when the is set to "1". If is cleared to "0", received data is transferred to the SBI0DBR in complete blocks. The received mode ends when the transfer is completed. In order to confirm whether data is being received properly by the program, the SBI0SR to be sensed. The is cleared to "0" when receiving is completed. When it is confirmed that receiving has been completed, the last data is read. When the is set to "1", data receiving stops. The is cleared to "0" (The received data becomes invalid, therefore no need to read it).
Note:
When the transfer mode is changed, the contents of the SBI0DBR will be lost. If the mode must be changed, conclude data receiving by clearing the to "0", read the last data, then change the mode.
92CM27-291
2005-04-20
TMP92CM27
Clear SCK pin (Output) SI pin INTSBI0 interrupt request SBI0DBR
a b a0 a1 a2 a3 a4 a5 a6 a7 b0 b1 b2 b3 b4 b5 b6 b7
Read receive data
Read receive data
Figure 3.11.34 Receiver Mode (Example: Internal clock) 3. 8-bit transmit/receive mode Set a control register to a transmit/receive mode and write data to the SBI0DBR. After the data is written, set the SBI0CR1 to "1" to start transmitting/receiving. When data is transmitted, the data is output from the SO0 pin, starting from the least significant bit (LSB) and synchronized with the leading edge of the serial clock signal. When data is received, the data is input via the SI0 pin on the trailing edge of the serial clock signal. 8-bit data is transferred from the shift register to the SBI0DBR and the INTSBI0 interrupt request is generated. The interrupt service program reads the received data from the data buffer register and writes the data which is to be transmitted. The SBI0DBR is used for both transmitting and receiving. Transmitted data should always be written after received data is read. When the internal clock is used, the automatic wait function will be in effect until the received data is read and the new data is written. When the external clock is used, since the shift operation is synchronized with the external clock, the received data is read and transmitted data is written before a new shift operation is executed. The maximum transfer speed when the external clock is used is determined by the delay time between the time when an interrupt request is generated and the time at which received data is read and transmitted data is written. When the transmit is started, after the SBI0SR goes "1" output from the SO0 pin holds final bit of the last data until falling edge of the SCK. Transmitting/receiving data ends when the is cleared to "0" by the INTSBI0 interrupt service program or when the SBI0CR1 is set to "1". When the is cleared to "0", received data is transferred to the SBI0DBR in complete blocks. The transmit/receive mode ends when the transfer is completed. In order to confirm whether data is being transmitted/received properly by the program, set the SBI0SR to be sensed. The is cleared to "0" when transmitting/receiving is completed. When the is set to "1", data transmitting/receiving stops. The is then cleared to "0".
Note:
When the transfer mode is changed, the contents of the SBI0DBR will be lost. If the mode must be changed, conclude data transmitting/receiving by clearing the to "0", read the last data, and then change the transfer mode.
92CM27-292
2005-04-20
TMP92CM27
Clear SCK0 pin (Output) SO0 pin SI0pin INTSBI0 interrupt SBI0DBR Interrupt
a c b d
* a0
a1 c1
a2 c2
a3 c3
a4 c4
a5 c5
a6 c6
a7 c7
b0 d0
b1 d1
b2 d2
b3 d3
b4 d4
b5 d5
b6 d6
b7 d7
c0
Write transmission data (a)
Write transmission data (b) Read receiving data (c) Read receiving data (d)
Figure 3.11.35 Transmission/Receiving Mode (when an external clock is used)
SCK0 pin SO0 pin
Bit6
Bit7 in last transmitted word tSODH = 4/fSYS [s] (Min)
Figure 3.11.36 Transmission Data Hold Time at End of Transmission/Receiving (Transmission/receiving mode)
92CM27-293
2005-04-20
TMP92CM27
3.12 High Speed SIO (HSC)
TMP92CM27 includes 2 High Speed SIO channels. Each channel is called HSC0 and HSC1. Each channel supports only the master mode in I/O interface mode (synchronous transmission). The features as follows. 1) Double buffer (Transmit/Receive) 2) Generate CRC7 and CRC16 of Transmit/Receive data 3) Baud Rate : 10Mbps max 4) MSB/LSB-first 5) 8/16bit data length 6) Clock Rising/Falling edge 7) The interruption function of each 1 channel : INTHSC0/INTHSC1 Read, Mask, Clear interrupt and Clear enable can control each 4 interrupts: RFR0/1 (Receive buffer of HSC0RD/HSC1RD: Full), RFW0/1 (Transmission buffer of HSC0TD/HSC1TD: Empty), REND0/1 (Receive buffer of HSC0RS/HSC1RS: Full), TEND0/1 (Transmission buffer of HSC0TS/HSC1TS: Empty). RFR0/1, RFW0/1 can high-speed transaction by micro DMA.
High Speed SIO channels 0 to 1 can be used independently. All channels operate in the same function except for the following points; hence only the operation of channel 0 is explained below. Table 3.12.1 Differences between each Channels
HSC0 Pin name HSSI0 (PD0) HSSO0 (PD1) HSSCLK0 (PD2) HSC0MD (C00H/C01H) HSC0CT (C02H/C03H) HSC0ST (C04H/C05H) HSC0CR (C06H/C07H) HSC0IS (C08H/C09H) HSC0WE (C0AH/C0BH) HSC0IE (C0CH/C0DH) HSC0IR (C0EH/C0FH) HSC0TD (C10H/C11H) HSC0RD (C12H/C13H) HSC0TS (C14H/C15H) HSC0RS (C16H/C17H) HSC1 HSSI1 (PL4) HSSO1 (PL5) HSCLK1 (PL6) HSC1MD (C20H/C21H) HSC1CT (C22H/C23H) HSC1ST (C24H/C25H) HSC1CR (C26H/C27H) HSC1IS (C28H/C29H) HSC1WE (C2AH/C2BH) HSC1IE (C2CH/C2DH) HSC1IR (C2EH/C2FH) HSC1TD (C30H/C31H) HSC1RD (C32H/C33H) HSC1TS (C34H/C35H) HSC1RS (C36H/C37H)
SFR (address)
92CM27-294
2005-04-20
TMP92CM27
3.12.1
Block diagram
The block diagram of each channel is shown in the figure 3.12.1 and figure 3.12.2.
fSYS
Baud rate Generator
HSCLK0
16bit
16bit
HSC0MD/CT
HSC0ST
16bit
Transmitt,Receive Controller
HSC0TD
HSC0TS
Internal data bus
HSSO0
HSC0RD
16bit
HSC0RS
HSSI0
16bit
16bit
INTHSC0
Note ) By Reset, HSCLK0, HSSO0, HSSI0 pin are set to input port (PortD0, D1, D2) so that pull-up resister is needed.
Figure 3.12.1 HSC0 Block diagram
HSC0CR
HSC0IE/IS/WE
92CM27-295
2005-04-20
TMP92CM27
fSYS
Baud rate Generator
HSCLK1
16bit
16bit
HSC1MD/CT
HSC1ST
16bit
Transmitt,Receive Controller
HSC1TD
HSC1TS
Internal data bus
HSSO1
HSC1RD
16bit
HSC1RS
HSSI1
16bit
16bit
INTHSC1
Note ) By Reset, HSCLK1, HSSO1, HSSI1 pin are set to input port (PortL4, L5, L6) so that pull-up resister is needed.
Figure 3.12.2 HSC1 Block diagram
HSC1CR
HSC1IE/IS/WE
92CM27-296
2005-04-20
TMP92CM27
3.12.2
SFR
SFR is explained below. These are connected to CPU with 16bit data bus. (1) Mode setting register Register is for operation mode or clock etc.
HSC0MD Register 7 6 XEN0 R/W 0 SYSCK 0: disable 1: enable 1 Select baud rate 000: Reserved 001: fSYS/2 010: fSYS/4 011: fSYS/8 13 DOSTAT0 1
HSSO0 pin
5
4
3
2
1 R/W 0
0
HSC0MD (0C00H)
bit Symbol Read/Write After Reset
CLKSEL02 CLKSEL01 CLKSEL00 0
Function
100: fSYS/16 101: fSYS/32 111: fSYS/64 111:Reserved 9 8 RDINV0 0
Invert data During receiving 0: disable 1: enable
15 bit Symbol (0C01H) Read/Write After Reset 0
LOOPBACK test mode 0:disbale
14 R/W 1
Start bit for
12
11 TCPOL0 0
clock edge during transmitting 0: fall 1: rise
10 RCPOL0 R/W 0
clock edge during receiving 0: fall 1: rise
LOOPBACK0 MSB1ST0
TDINV0 0
During transmitting 0: disable 1: enable
Synchronous Synchronous Invert data
transmit/rece (no transmit) ive 0:LSB 1:MSB 0:fixed to "0" 1:fixed to "1"
Function
1:enable
Figure 3.12.3 HSC0MD Register
HSC1MD Register 7 HSC1MD (0C20H) bit Symbol Read/Write After Reset 6 XEN1 R/W 0 SYSCK 0: disable 1: enable 1 Select baud rate 000: Reserved 001: fSYS/2 010: fSYS/4 011: fSYS/8 13 DOSTAT1 1
HSSO1 pin
5
4
3
2
1 R/W 0
0
CLKSEL12 CLKSEL11 CLKSEL10 0
Function
100: fSYS/16 101: fSYS/32 111: fSYS/64 111:Reserved 9 8 RDINV1 0
Invert data During receiving 0: disable 1: enable
15 bit Symbol (0C21H) Read/Write After Reset 0
LOOPBACK test mode 0:disbale
14 R/W 1
Start bit for
12
11 TCPOL1 0
clock edge during transmitting 0: fall 1: rise
10 RCPOL1 R/W 0
clock edge during receiving 0: fall 1: rise
LOOPBACK1 MSB1ST1
TDINV1 0
During transmitting 0: disable 1: enable
Synchronous Synchronous Invert data
transmit/rece (no transmit) ive 0:LSB 1:MSB 0:fixed to "0" 1:fixed to "1"
Function
1:enable
Figure 3.12.4 HSC1MD Register
92CM27-297
2005-04-20
TMP92CM27
(a) Because Internal HSSO0 can be input to internal HSSI0, it can be used as test. Please change the setting when transmitting/receiving is not in operation.
Transmitting data Receiving data Y S HSC0MD B A HSSI0 pin
HSSO0 pin
Figure 3.12.5 Register Function (b) Select the start bit of transmit/receive data Please change the setting when transmitting/receiving is not in operation. (c) Set the status of HSSO0 pin during no transmitting (after transmitting or during receiving). Please change the setting when transmitting/receiving is not in operation. (d) Select the edge of synchronous clock during transmitting. Please change the setting during = "0". And set the same value of .
HSCLK0 pin (="0") HSCLK0 pin (="1") HSSO0 pin LSB Bit0 Bit1 Bit2 Bit3 Bit4 MSB Bit7
Figure 3.122.6 Register function (e) Select the edge of synchronous clock during receiving. Please change the setting during = "0". And set the same value of .
HSCLK0 pin (="0") HSCLK0 pin (="1") HSSI0 pin LSB Bit0 Bit1 Bit2 Bit3 Bit4 MSB Bit7
Figure 3.12.7 Register function
92CM27-298
2005-04-20
TMP92CM27
(f)
Select logical invert/no invert when output transmitted data from HSSO0 pin. Please change the setting when transmitting/receiving is not in operation. Data that input to CRC calculation circuit is transmission data that is written to HSC0TD. This input data is not corresponded to . is not corresponded to : it set condition of HSSO0 pin when it is not transferred.
(g) Select logical invert/no invert for received data from HSSI0 pin. Please change the setting when transmitting/receiving is not in operation. Data that input to CRC calculation circuit is selected by . (h) Select the operation for the internal clock. (i) Select baud rate. Baud rate is created from fSYS and settings are in under table. Please change the setting when transmitting/receiving is not in operation. Table 3.12.2 Example of baud rate
Baud rate [Mbps] fSYS/2 fSYS/4 fSYS/8 fSYS/16 fSYS/32 fSYS/64 fSYS =12MHz 6 3 1.5 0.75 0.375 0.1875 fSYS =16MHz 8 4 2 1 0.5 0.25 fSYS =20MHz 10 5 2.5 1.25 0.625 0.3125
92CM27-299
2005-04-20
TMP92CM27
(2) Control Register Register is for data length or CRC etc.
HSC0CT Register 7 HSC0CT (0C02H) bit Symbol Read/Write After Reset 0 Always write "0". Function - 6 - R/W 1 Always write "1". 0
Data length 0: 8bit 1: 16bit
5 UNIT160
4
3
2 ALGNEN0 0
Full duplex alignment 0: disable 1: enable
1 RXWEN0 R/W 0
Sequential receive 0: disable 1: enable
0 RXUEN0 0
Receive UNIT 0: disable 1: enable
15 (0C03H) bit Symbol Read/Write After Reset 0
CRC select 0: CRC7 1: CRC16 CRC16_7_B0
14
CRCRX_TX_B0
13
CRCRESET_B0
12
11
10
9 R/W
8 R/W 0
Micro DMA 0: Disable 1: Enable
DMAERFW0 DMAERFR0
R/W 0
CRC data 0: Transmit 1: Receive CRC calculate register 0:Reset 1:Release Reset
0
0
Micro DMA 0: Disable 1: Enable
Function
Figure 3.12.8 HSC0CT Register
HSC1CT Register 7 HSC1CT (C22H) bit Symbol Read/Write After Reset 0 Always write "0". Function - 6 - R/W 1 Always write "1". 0
Data length 0: 8bit 1: 16bit
5 UNIT161
4
3
2 ALGNEN1 0
Full duplex alignment 0: disable 1: enable
1 RXWEN1 R/W 0
Sequential receive 0: disable 1: enable
0 RXUEN1 0
Receive UNIT 0: disable 1: enable
15 (C23H) bit Symbol Read/Write After Reset 0
CRC select 0: CRC7 1: CRC16 CRC16_7_B1
14
CRCRX_TX_B1
13
CRCRESET_B1
12
11
10
9 R/W
8 R/W 0
Micro DMA 0: Disable 1: Enable
DMAERFW1 DMAERFR1
R/W 0
CRC data 0: Transmit 1: Receive CRC calculate register 0:Reset 1:Release Reset
0
0
Micro DMA 0: Disable 1: Enable
Function
Figure 3.12.9 HSC1CT Register
92CM27-300
2005-04-20
TMP92CM27
(a) Select CRC7 or CRC16 to calculate. (b) Select input data to CRC calculation circuit. (c) Initialize CRC calculate register. The process that calculating CRC16 of transmits data and sending CRC next to transmit data is explained as follows. 1. Set HSC0CT for select CRC7 or CRC16 and for select calculating data. 2. For reset HSC0CR register, write "1" after set to "0". 3. Write transmit data to HSC0TD register, and wait for finish transmission all data. 4. Read HSC0CR register, and obtain the result of CRC calculation. 5. Transmit CRC which is obtained in (4) by the same way as (3). CRC calculation of receive data is the same process.
92CM27-301
2005-04-20
TMP92CM27
Start
="1", ="0"
="0""1 " Transmit all data
Read CRC from HSC0CR
Write CRC in HSC0TD and send
End
Figure 3.12.10 Flow chart of CRC calculation
92CM27-302
2005-04-20
TMP92CM27
(d) Set clearing interrupt in CPU to unnecessary because be supported RFW0 interrupt to Micro DMA. If write "1" to, it be set to one-shot interrupt, clearing interrupt by HSC0WE register become to unnecessary. HSC0ST flag generate 1-shot interrupt when change from "0" to "1"(Rising). (e) Set clearing interrupt in CPU to unnecessary because be supported RFR0 interrupt to Micro DMA. If write "1" to, it be set to one-shot interrupt, clearing interrupt by HSC0WE register become to unnecessary. HSC0ST flag generate 1-shot interrupt when change from "0" to "1"(Rising). (f) Select the length of transmit/receive data. Data length is described as UNIT downward. Please change the setting when transmitting/receiving is not in operation. (g) Select whether using alignment function for transmit/receive per UNIT during full duplex. Please change the setting when transmitting/receiving is not in operation. (h) Set enable/disable of sequential receiving. (i) Set enable/disable of receiving operation per UNIT. In case = "1", this bit is not valid. Please change the setting when transmitting/receiving is not in operation. [Transmit / receive operation mode] It is supported 6 operation modes. They are selected in , and registers. Table 3.12.3 transmit/receive operation mode
Operation mode (1) Transmit UNIT (2) Sequential transmit (3) Receive UNIT (4) Sequential receive (5) Transmit/Receive UNIT with alignment (6) Sequential Transmit/Receive UNIT with alignment 0 0 0 0 1 Register setting 0 0 0 1 0 0 0 1 0 1 Transmit written data per UNIT Transmit written data sequentially Receive data of only 1 UNIT Receive automatically if buffer has space Transmit/receive 1 UNIT with alignment per each UNIT Transmit/receive sequentially with alignment per each UNIT Note
1
1
0
92CM27-303
2005-04-20
TMP92CM27
Difference between UNIT transmission and Sequential transmission UNIT transmit mode is transmitted every 1 UNIT by writing data after confirmed HSC0ST=1.The written transmission data is shifted in turn. In hard ware, transmission is kept executing as long as data exists. If it transmit data sequentially, write next data when HSC0TD is empty and HSC0ST=1. UNIT transmission and sequential transmission depend on the way of using. Hardware doesn't depend on. Figure 3.12.11 show Flow chart of UNIT transmission and Sequential transmission.
Start
Does HSC0TD have space? HSC0ST=1?
N Start
Y N N
Does HSC0TS have space? HSC0ST=1?
Does HSC0TD have space? HSC0ST=1?
Y Write transmission data to HSC0TD
Y Write transmission data to HSC0TD
Transmission all data end? Y
N
Transmission all data end? Y
N
Transmission end? HSC0ST=1?
N
Transmission end? HSC0ST=1?
N
Y Transmission end
Y Transmission end
UNIT transmission
Sequential transmission
Figure 3.12.11 Flow chart of UNIT transmission and Sequential transmission
92CM27-304
2005-04-20
TMP92CM27
Difference between UNIT receive and Sequential receive UNIT receive is the mode that receiving only 1 UNIT data. By writing "1" to HSC0CT, receives 1UNIT data, and received data is loaded in receive data register (HSC0RD). When HSC0RD register is read, read it after wrote "0" to HSC0CT. If data was read from HSC0RD with the condition HSC0CT= "1", 1 UNIT data is received again automatically. In hardware, this mode receives sequentially by Single buffer. HSC0ST is changed during UNIT receiving. Sequential receive is the mode that receive data and automatically when receive FIFO has space. Whenever buffer has space, next data is received automatically. Therefore, if data was read after data is loaded in HSC0RD, it is received sequentially every UNIT. In hardware, this mode receives sequentially by double buffer. Figure 3.12.12 show Flow chart of UNIT receive and Sequential receive.
92CM27-305
2005-04-20
TMP92CM27
Start
Start
Write "1" to HSC0CT
Write "1" to HSC0CT
Receiving end? HSC0ST=1? Y Read receive data from HSC0RD
N
Receiving end? HSC0ST=1? Y Read receiving data from HSC0RD
N
Program receive number -1 Receiving end?
N
Program receive number -2 Receiving end?
N
Y N
Y N
Last second receiving end ? HSC0ST=1?
Last receiving end? HSC0ST=1?
Y Write "0" to HSC0CT
Y
Last second receiving end ? HSC0ST=1?
N
Read last receiving data from HSC0RD
Y
Write "0" to HSC0CT
End Read second data from last from HSC0RD
N
Does last-data exist in HSC0RD? SPIST=1?
Y
Read last receiving data from HSC0RD
End
UNIT receive
Sequential receive
Figure 3.12.12 Flow chart of UNIT receive and Sequential receive
92CM27-306
2005-04-20
TMP92CM27
(3) Interrupt , Status register Read of condition, Mask of condition, Clear interrupt and Clear enable can control each 4 interrupts; RFR0(HSC0RD receiving buffer is full), RFW0(HSC0TD transmission buffer is empty), REND0(HSC0RS receiving buffer is full), TEND0(HSC0TS transmission buffer is empty). RFR0, RFW0 can high-speed transaction by micro DMA. Following is description of Interrupt status (example RFW0). Status register HSC0ST show RFW0 (internal signal that show whether transmission data register exist or not). This register is "0" when transmission data exist. This register is "1" when transmission data doesn't exist. It can read internal signal directly. Therefore, it can confirm transmission data at any time. Interrupt status register HSC0IS is set by rising edge of RFW0. This register keeps that condition until write "1" to this register and reset when HSC0WE is "1". RFW0 interrupt generate when interrupt enable register HSC0IE is "1". When it is "0", interrupt is not generated. Interrupt request register HSC0IR show whether interrupt is generating or not. Interrupt status write enable register HSC0WE set that enables reset for reset interrupts status register by mistake. Circuit config of transmission data shift register (HSC0TS), receiving register (HSC0RD), receiving data shift register (HSC0RS) are same with above register. Control register HSC0CT, HSC0CT is register for using micro DMA. When micro DMA transfer is executed by using RFW0 interrupt, set "1" to , and when it is executed by using RFR0 interrupt, set "1" to , and prohibit other interrupt.
Control register HSC0CT
Stattus (RFW0) of Transmission data register (HSC0TD): exist data:0, No data: 1
Interrupt enable register HSC0IE
D Q
No transmit of tansmission data register (HSC0TD) 0: exist data, 1:no data Write "1"
D CK
Status register HSC0ST
CK
Control register HSC0CT Interrupt request register HSC0IR
Rising edge detection
S R
Q
INTHSC0
Q
Interrupt status register HSC0IS Interrupt status write enable register HSC0WE
Status (TEND0) of Transmission data shift register (HSC0ST) 0: exist data, 1: no data Status (RFR0) of Receiving data register (HSC0RD) 0: exist data, 1: no data Status (REND0) of Receiving data shift register (HSC0RS) 0: exist data, 1: no data
Figure 3.12.2 Figurer for interrupt, status
92CM27-307
2005-04-20
TMP92CM27
(3-1) Status register Register shows 4 status.
HSC0ST Register 7 HSC0ST (0C04H) bit Symbol Read/Write After Reset 1
Receiving
6
5
4
3 TEND0
2 REND0 R 0
Receive Shift register buffer
1 RFW0 1
Transmit
0: untransmitted data exist 1: no untransmitted data
0 RFR0 0
Receive buffer 0:no valid data 1:valid data exist
Function
0:operation 1: no operation
0: no data 1: exist data
15 bit Symbol (0C05H) Read/Write After Reset
14
13
12
11
10
9
8
Function
Figure 3.12.3 HSC0ST Register
HSC1ST Register 7 HSC1ST (0C24H) bit Symbol Read/Write After Reset 1
Receiving
6
5
4
3 TEND1
2 REND1 R 0
Receive Shift register buffer
1 RFW1 1
Transmit
0: untransmitted data exist 1: no untransmitted data
0 RFR1 0
Receive buffer 0:no valid data 1:valid data exist
Function
0:operation 1: no operation
0: no data 1: exist data
15 bit Symbol (0C25H) Read/Write After Reset
14
13
12
11
10
9
8
Function
Figure 3.12.4 HSC1ST Register
92CM27-308
2005-04-20
TMP92CM27
(a) This bit is set to "0" when valid data to transmit exists in the shift register for transmit. It is set to "1" when finish transmitting all the data. (b) This bit is set to "0" when receiving is in operation or no valid data exist in receive shift register. It is set to "1", when valid data exist in receive read register and keep the data without shifting. It is cleared to "0", when CPU read the data and shift to receive read register. (c) After wrote the received data to receive data write register, shift the data to receive data shift register. It keeps "0" until all valid data has moved. And it is set to "1" when it can accept the next data with no valid data. (d) This bit is set to "1" when received data is shifted from received data shift register to received data read register and valid data exist. It is set to "0" when the data is read and no valid data.
92CM27-309
2005-04-20
TMP92CM27
(3-2) Interrupt status register Register read 4 interrupt status and clear interrupt. This register is cleared to "0" by writing "1" to applicable bit. Status of this register show interrupt source state. This register can confirm changing of interrupt condition, even if interrupt enable register is masked.
HSC0IS Register 7 HSC0IS (0C08H) bit Symbol Read/Write After Reset
Read
6
5
4
3 TENDIS0 0
Read
2 RENDIS0 0
Read
1 RFWIS0 0
Read
0 RFRIS0 0
R/W
0:no interrupt 0:no interrupt 0:no interrupt 0:nointerrupt
Function
1:interrupt Write 0:Don't care 1:clear
1:interrupt Write 0:Don't care 1:clear
1:interrupt Write 1:clear
1:interrupt Write 1:clear
0:Don't care 0:Don't care
15 bit Symbol (0C09H) Read/Write After Reset
14
13
12
11
10
9
8
Function
Figure 3.12.5 HSC0IS Register
HSC0IS Register 7 HSC1IS (0C28H) bit Symbol Read/Write After Reset
Read
6
5
4
3 TENDIS1 0
Read
2 RENDIS1 0
Read
1 RFWIS1 0
Read
0 RFRIS1 0
R/W
0:no interrupt 0:no interrupt 0:no interrupt 0:nointerrupt
Function
1:interrupt Write 0:Don't care 1:clear
1:interrupt Write 0:Don't care 1:clear
1:interrupt Write 1:clear
1:interrupt Write 1:clear
0:Don't care 0:Don't care
15 bit Symbol (0C29H) Read/Write After Reset
14
13
12
11
10
9
8
Function
Figure 3.12.6 HSC1IS Register
92CM27-310
2005-04-20
TMP92CM27
(a) This bit read status of TEND interrupt and clear interrupt. If write this bit, set "1" to HSC0WE. (b) This bit read status of REND interrupt and clear interrupt. If write this bit, set "1" to HSC0WE. (c) This bit read status of RFW interrupt and clear interrupt. If write this bit, set "1" to HSC0WE. (d) This bit read status of RFR interrupt and clear interrupt. If write this bit, set "1" to HSC0WE.
92CM27-311
2005-04-20
TMP92CM27
(3-3) Interrupt status write enable register Register set clear enable for 4 interrupt stasus bit.
HSC0WE Register 7 HSC0WE (0C0AH) bit Symbol Read/Write After Reset
Clear HSC0IS
6
5
4
3
2 R/W
1
0 RFRWE0 0
Clear HSC0IS 0: disable 1: enable
TENDWE0 RENDWE0 RFWWE0 0
Clear HSC0IS
0
Clear
0
HSC0IS
Function
0: disable 1: enable
0: disable 1: enable 0: disable 1: enable
15 bit Symbol (0C0BH) Read/Write After Reset
14
13
12
11
10
9
8
Function
Figure 3.12.20 HSC0WE Register
HSC1WE Register 7 HSC1WE (0C2AH) bit Symbol Read/Write After Reset
Clear HSC1IS
6
5
4
3
2 R/W
1
0 RFRWE1 0
Clear HSC1IS 0: disable 1: enable
TENDWE1 RENDWE1 RFWWE1 0
Clear HSC1IS
0
Clear
0
HSC1IS
Function
0: disable 1: enable
0: disable 1: enable 0: disable 1: enable
15 bit Symbol (0C2BH) Read/Write After Reset
14
13
12
11
10
9
8
Function
Figure 3.12.21 HSC1WE Register
92CM27-312
2005-04-20
TMP92CM27
(a) This bit set clear enable of HSC0IS. (b) This bit set clear enable of HSC0IS. (c) This bit set clear enable of HSC0IS. (d) This bit set clear enable of HSC0IS.
92CM27-313
2005-04-20
TMP92CM27
(3-4) Interrupt enable register Register set output enable for 4 interrupt.
HSC0IE Register 7 HSC0IE (0C0CH) Read/Write After Reset bit Symbol 6 5 4 3 TENDIE0 0
TEND0 interrupt 0: Disable 1: Enable
2 RENDIE0 R/W 0
REND0 interrupt 0: Disable 1: Enable
1 RFWIE0 0
RFW0 interrupt 0: Disable 1: Enable
0 RFRIE0 0
RFR0 interrupt 0: Disable 1: Enable
Function
15 bit Symbol Read/Write After Reset (0C0DH)
14
13
12
11
10
9
8
Function
Figure 3.12.22 HSC0IE Register
HSC1IE Register 7 HSC1IE (0C2CH) bit Symbol Read/Write After Reset 0
TEND1 interrupt 0: Disable 1: Enable
6
5
4
3 TENDIE1
2 RENDIE1 R/W 0
REND1 interrupt 0: Disable 1: Enable
1 RFWIE1 0
RFW1 interrupt 0: Disable 1: Enable
0 RFRIE1 0
RFR1 interrupt 0: Disable 1: Enable
Function
15 bit Symbol Read/Write After Reset (0C2DH)
14
13
12
11
10
9
8
Function
Figure 3.12.23 HSC1IE Register
92CM27-314
2005-04-20
TMP92CM27
(a) This bit set TEND0 interrupt enable. (b) This bit set REND0 interrupt enable. (c) This bit set RFW0 interrupt enable. (d) This bit set RFR0 interrupt enable.
92CM27-315
2005-04-20
TMP92CM27
(3-5) Interrupt request register Register show generation condition for 4 interrupts. This regiter read "0" (interrupt doesn't generate) always when Interrupt enable register is masked.
HSC0IR Register 7 HSC0IR (0C0EH) bit Symbol Read/Write After Reset 0
TEND0 interrupt 0: none 1:generate
6
5
4
3 TENDIR0
2 RENDIR0 R 0
REND0 interrupt 0: none 1:generate
1 RFWIR0 0
RFW0 interrupt 0: none 1:generate
0 RFRIR0 0
RFR0 interrupt 0: none 1:generate
Function
15 bit Symbol Read/Write (0C0FH) After Reset
14
13
12
11
10
9
8
Function
Figure 3.12.24 HSC0IR Register
HSC1IR Register 7 HSC1IR (0C2EH) bit Symbol Read/Write After Reset 0
TEND1 interrupt 0: none 1:generate
6
5
4
3 TENDIR1
2 RENDIR1 R 0
REND1 interrupt 0: none 1:generate
1 RFWIR1 0
RFW1 interrupt 0: none 1:generate
0 RFRIR1 0
RFR1 interrupt 0: none 1:generate
Function
15 bit Symbol Read/Write (0C2FH) After Reset
14
13
12
11
10
9
8
Function
Figure 3.12.25 HSC1IR Register
92CM27-316
2005-04-20
TMP92CM27
(a) This bit shows condition of TEND0 interrupt generation. (b) This bit shows condition of REND0 interrupt generation. (c) This bit shows condition of RFW0 interrupt generation. (d) This bit shows condition of RFR0 interrupt generation.
92CM27-317
2005-04-20
TMP92CM27
(4) HSC0CR (HSC0 CRC register) Register load result of CRC calculation for transmission/receiving in it.
HSC0CR register 7 HSC0CR (0C06H) bit Symbol Read/Write After reset Function 15 bit Symbol (0C07H) Read/Write After reset Function 0 0 0 0 CRCD015 14 CRCD014 13 CRCD013 12 CRCD012 R 0 0 0 0 11 CRCD011 10 CRCD010 9 8 0 0 0 0 CRCD007 6 CRCD006 5 CRCD005 4 CRCD004 R 0 0 0 0 3 CRCD003 2 CRCD002 1 0
CRCD001 CRCD000
CRC calculation result load register [7:0]
CRCD009 CRCD008
CRC calculation result load register [15:8]
Figure 3.12.26 HSC0CR register
HSC1CR register 7 HSC1CR (0C26H) bit Symbol Read/Write After reset Function 15 bit Symbol (0C27H) Read/Write After reset Function 0 0 0 0 CRCD115 14 CRCD114 13 CRCD113 12 CRCD112 R 0 0 0 0 11 CRCD111 10 CRCD110 9 8 0 0 0 0 CRCD107 6 CRCD106 5 CRCD105 4 CRCD104 R 0 0 0 0 3 CRCD103 2 CRCD102 1 0
CRCD101 CRCD100
CRC calculation result load register [7:0]
CRCD109 CRCD108
CRC calculation result load register [15:8]
Figure 3.12.27 HSC1CR register
92CM27-318
2005-04-20
TMP92CM27
(a) The result that is calculated according to the setting; HSC0CT, and , are loaded in this register. In case CRC16, all bits are valid. In case CRC7, lower 7 bits are valid. The flow will be showed to calculate CRC16 of received data for instance by flowchart. Firstly, initialize CRC calculation register by writing = "1" after set = "1", = "0", = "0". Next, finish transmitting all bits to calculate CRC by writing data in HSC0TD register. Confirming whether receiving is finished or not use HSC0ST. If HSC0CR register was read after finish, CRC16 of transmission data can read.
92CM27-319
2005-04-20
TMP92CM27
(5) Transmission data register Register is register for write transmission data.
HSC0TD Register 7 HSC0TD (0C10H) bit Symbol Read/Write After Reset Function 15 bit Symbol (0C11H) Read/Write After Reset Function 0 0 0 0 TXD015 14 TXD014 13 TXD013 12 TXD012 R/W 0 0 0 0 Transmission data register [15:8] 11 TXD011 10 TXD010 9 TXD009 8 TXD008 0 0 0 TXD007 6 TXD006 5 TXD005 4 TXD004 R/W 0 0 0 Transmission data register [7:0] 0 0 3 TXD003 2 TXD002 1 TXD001 0 TXD000
Figure 3.12.28 HSC0TD Register
HSC1TD Register 7 HSC1TD (0C30H) bit Symbol Read/Write After Reset Function 15 bit Symbol (0C31H) Read/Write After Reset Function 0 0 0 0 TXD115 14 TXD114 13 TXD113 12 TXD112 R/W 0 0 0 0 Transmission data register [15:8] 11 TXD111 10 TXD110 9 TXD109 8 TXD108 0 0 0 TXD0107 6 TXD106 5 TXD105 4 TXD104 R/W 0 0 0 Transmission data register [7:0] 0 0 3 TXD103 2 TXD102 1 TXD101 0 TXD100
Figure 3.12.29 HSC1TD Register
92CM27-320
2005-04-20
TMP92CM27
(a) This bit is bit for write transmission data. When read, the last written data is read. The data is overwritten when next data was written with condition of this register does not empty. In this case, please write after checked the status of RFW0. In case HSC0CT= "1", all bits are valid. In case HSC0CT= "0", lower 7 bits are valid.
92CM27-321
2005-04-20
TMP92CM27
(6) Receiving data register Register is register for read receiving data.
HSC0RD Register 7 HSC0RD (0C12H) bit Symbol Read/Write After Reset Function 15 (0C13H) bit Symbol Read/Write After Reset Function 0 0 0 0 RXD015 14 RXD014 13 RXD013 12 RXD012 R 0 0 0 0 Receive data register [15:8] 11 RXD011 10 RXD010 9 RXD009 8 RXD008 0 0 0 RXD007 6 RXD006 5 RXD005 4 RXD004 R 0 0 Receive data register [7:0] 0 0 0 3 RXD003 2 RXD002 1 RXD001 0 RXD000
Figure 3.12.30 HSC0RD Register
HSC1RD Register 7 HSC1RD (0C32H) bit Symbol Read/Write After Reset Function 15 (0C33H) bit Symbol Read/Write After Reset Function 0 0 0 0 RXD115 14 RXD114 13 RXD113 12 RXD112 R 0 0 0 0 Receive data register [15:8] 11 RXD111 10 RXD110 9 RXD109 8 RXD108 0 0 0 RXD107 6 RXD106 5 RXD105 4 RXD104 R 0 0 Receive data register [7:0] 0 0 0 3 RXD103 2 RXD102 1 RXD101 0 RXD100
Figure 3.12.31 HSC1RD Register
92CM27-322
2005-04-20
TMP92CM27
(a) HSC0RD register is register for reading receiving data. Please read after checked status of RFK. In case HSC0CT = "1", all bits are valid. In case HSC0CT = "0", lower 7 bits are valid.
92CM27-323
2005-04-20
TMP92CM27
(7) Transmit data shift register Register change transmission data to serial. This register is used for confirming changing condition when LSI test.
HSC0TS Register 7 HSC0TS (0C14H) bit Symbol Read/Write After Reset Function 15 bit Symbol Read/Write (0C15H) After Reset Function 0 0 0 0 TSD015 14 TSD014 13 TSD013 12 TSD012 R 0 0 0 0 Transmit data shift register [15:8] 11 TSD011 10 TSD010 9 TSD009 8 TSD008 0 0 0 TSD007 6 TSD006 5 TSD005 4 TSD004 R 0 0 0 Transmit data shift register [7:0] 0 0 3 TSD003 2 TSD002 1 TSD001 0 TSD000
Figure 3.12.32 HSC0TS Register
HSC1TS Register 7 HSC1TS (0C34H) bit Symbol Read/Write After Reset Function 15 bit Symbol Read/Write (0C35H) After Reset Function 0 0 0 0 TSD115 14 TSD114 13 TSD113 12 TSD112 R 0 0 0 0 Transmit data shift register [15:8] 11 TSD111 10 TSD110 9 TSD109 8 TSD108 0 0 0 TSD107 6 TSD106 5 TSD105 4 TSD104 R 0 0 0 Transmit data shift register [7:0] 0 0 3 TSD103 2 TSD102 1 TSD101 0 TSD100
Figure 3.12.33 HSC1TS Register (a) This register is register for reading the status of transmission data shift register. In case HSC0CT= "1", all bits are valid. In case HSC0CT= "0", lower 7 bits are valid.
92CM27-324
2005-04-20
TMP92CM27
(8) Receive data shift register Register is register for reading receive data shift register.
HSC0RS Register 7 HSC0RS (0C16H) bit Symbol Read/Write After Reset Function 15 bit Symbol (0C17H) Read/Write After Reset function 0 0 0 0 RSD015 14 RSD014 13 RSD013 12 RSD012 R 0 0 0 0 Receive data shift register [15:8] 11 RSD011 10 RSD010 9 RSD009 8 RSD008 0 0 0 RSD007 6 RSD006 5 RSD005 4 RSD004 R 0 0 Receive data shift register [7:0] 0 0 0 3 RSD003 2 RSD002 1 RSD001 0 RSD000
Figure 3.12.34 HSC0RS Register
HSC1RS Register 7 HSC1RS (0C36H) bit Symbol Read/Write After Reset Function 15 bit Symbol (0C37H) Read/Write After Reset function 0 0 0 0 RSD115 14 RSD114 13 RSD113 12 RSD112 R 0 0 0 0 Receive data shift register [15:8] 11 RSD111 10 RSD110 9 RSD109 8 RSD108 0 0 0 RSD107 6 RSD106 5 RSD105 4 RSD104 R 0 0 Receive data shift register [7:0] 0 0 0 3 RSD103 2 RSD102 1 RSD101 0 RSD100
Figure 3.12.35 HSC1RS Register (a) This register is register for reading the status of receives data shift register. In case HSC0CT= "1", all bits are valid. In case HSC0CT="0", lower 7 bits are valid.
92CM27-325
2005-04-20
TMP92CM27
3.12.3
Operation timing
Following examples show operation timing.
* Setting condition 1: Transmission in UNIT=8bit, LSB first
HSC0TD Write pulse INTHSC0 Interrupt signal HSC0IS Clear write pulse HSC0IS HSC0IR (HSC0IE="1") HSC0ST HSC0IR (HSC0IE"1"
HSC0IS HSC0ST HSCLK0 pin (="0") HSCLK0 pin (="1") HSSO0 pin
LSB Bit0 Bit1 Bit2 Bit3 Bit4
MSB Bit7
LSB Bit0
Bit1
Bit2
Bit3
Bit4
MSB Bit7
Figure 3.12.36 Transmission timing In above condition, HSC0ST flag is set to "0" just after wrote transmission data. When data of HSC0TD register finish shifting to transmission register (HSC0TS), HSC0ST is set to "1", it is informed that can write next transmission data, start transmission clock and data from HSCLK0 pin and HSSO0 pin at same time with inform. In this case, HSC0IS, HSC0IR change and INTHSC0 interrupt generate by synchronization to rising of HSC0ST flag. When HSC0IR register is setting to "1", interrupt is not generated even if HSC0ST was set to "1". When finish transmission and lose data that must to transmit to HSC0TD register and HSC0TS register, transmission data and clock are stopped by setting "1" to HSC0ST, and INTHSC0 interrupt is generated at same time. In this case, if HSC0ST is set to "1" at different interrupt source, INTHSC0 is not generated. Therefore must to clear HSC0IS to "0".
92CM27-326
2005-04-20
TMP92CM27
* Setting condition 2: UNIT transmission in UNIT=8bit, LSB first
HSC0RD Read pulse HSC0ST HSC0ST HSC0IS HSC0IS HSCLK0 pin (="0") HSCLK0 pin (="1") HSSI0 pin
LSB Bit0
MSB Bit1 Bit2 Bit3 Bit4 Bit7
LSB Bit0 Bit1 Bit2 Bit3 Bit4
MSB Bit7
Figure 3.12.37 UNIT receiving (HSC0CT=1) If set HSC0CT to "1" without valid receiving data to HSC0RD register (HSC0ST=0), UNIT receiving is started. When receiving is finished and stored receiving data to HSC0RD register, HSC0ST flag is set to "1", and inform that can read receiving data. Just after read HSC0RD register, HSC0ST flag is cleared to "0" and it start receiving next data automatically. If be finished UNIT receiving, set HSC0CT to "0" after confirmed that HSC0ST was set to "1".
92CM27-327
2005-04-20
TMP92CM27
* Setting condition 3: Sequential receiving in UNIT=8 bit, LSB first
HSC0RD Read pulse HSC0ST HSC0ST HSC0IS HSC0IS
HSCLK0 pin (="0") HSCLK0 pin (="1") HSSI0 pin
LSB
MSB
LSB
MSB LSB
MSB
Bit0
Bit1 Bit2 Bit3 Bit4
Bit7
Bit0 Bit1 Bit2 Bit3 Bit4
Bit7 Bit0 Bit1 Bit2 Bit3 Bit4
Bit7
Figure 3.12.38 continuous receiving (HSC0CT=1) If set HSC0CT to "1" without valid receiving data in HSC0RD register (HSC0ST=0), sequential receiving is started. When first receiving is finished and stored receiving data to HSC0RD register, HSC0ST flag is set to "1", and inform that can read receiving data. Sequential receiving is received until receiving data is stored to HSC0RD and HSC0RS registers If finished sequential receiving, set HSC0CT to "0" after confirmed that HSC0ST was set to "1".
92CM27-328
2005-04-20
TMP92CM27
* Setting condition 4: Transmission by using micro DMA in UNIT=8bit, LSB first
INTHSC0 Interrupt pulse HSC0TD Write pulse HSC0ST HSC0ST HSC0IS HSC0IR HSC0IS
HSCLK0 pin (="0") HSCLK0 pin (="1") HSSO0 pin
LSB
MSB
LSB
MSB
LSB
Bit0
Bit1
Bit2
Bit3
Bit4
Bit7
Bit0
Bit1
Bit2
Bit3
Bit4
Bit7
Bit0
Figure 3.12.39 Micro DMA transmission (transmission) If all bits of HSC0IE register are "0" and HSC0CT is "1", transmission is started by writing transmission data to HSC0TD register. If data of HSC0TD register is shifted to HSC0TS register and HSC0ST is set to "1" and can write next transmission data, INTHSC0 interrupt (RFW0 interrupt) is generated. By starting Micro DMA at this interrupt, can transmit sequential data automatically. However, If transmit it at Micro DMA, set Micro DMA beforehand.
92CM27-329
2005-04-20
TMP92CM27
* Setting condition 5: Receiving by using micro DMA in UNIT=8bit, LSB first
INTHSC0 Interrupt pulse HSC0RD Read pulse HSC0ST HSC0ST HSC0IS HSC0IS
HSCLK0 pin (= "0") HSCLK0 pin (= "1") HSSI0 pin
LSB
MSB
LSB
MSB
Bit0 Bit1 Bit2 Bit3 Bit4
Bit7
Bit0 Bit1 Bit2 Bit3 Bit4
Bit7
Figure 3.12.40 Micro DMA transmission (UNIT receiving (HSC0CT=1)) If all bits of HSC0IE register is "0" and HSC0CT is "1", UNIT receiving is started by setting HSC0CT to "1". If receiving data is stored to HSC0RD register and can read receiving data, INTHSC0 interrupt (RFR0 interrupt) is generated. By starting Micro DMA at this interrupt, it can be received sequential data automatically. However, If receive it at Micro DMA, set Micro DMA beforehand.
92CM27-330
2005-04-20
TMP92CM27
3.12.4
Example
Following is discription of HSC0 setting method. (1) UNIT transmission This example show case of transmission is executed by following setting, and it is generated INTHSC0 interrupt by finish transmission. UNIT: 8bit LSB first Baud rate : fSYS/8 Synchronous clock edge: Rising
Setting expample
ld ld
(pdfc), 0x07 (pdcr), 0x06
; Port setting PD0: HSSI0, PD1: HSSO0, PK7: HSCLK0 ; port setting PD0: HSSI0, PD1: HSSO0, PK7: HSCLK0
ldw (hsc0ct),0x0040 ldw (hsc0md),0x2c43
; Set data length to 8bit ; System clock enable, baud rate selection: fSYS/8 ; LSB first, synchronous clock edge setting: set to Rising
ld ld ei
(hsc0ie),0x08 (inteahsc0),0x10
; Set to TEND0 interrupt enable ; Set INTHSC0 interrupt level to 1 ; Interrupt enable (iff=0)
loop bit jr 1,(hsc0st) z,loop
;Confirm that transmission data register doesn't have no transmission data ; =1 ?
ld
(hsc0td),0x3a
; Write Transmission data and Start transmission
HSC0TD Write pulse HSCLK0 output HSSO0 output INTHSC0 Interrupt signal (Internal clock)
Figure 3.12.41 Example of UNIT transmission
92CM27-331
2005-04-20
TMP92CM27
(2) UNIT receiving This example show case of receiving is executed by following setting, and it is generated INTHSC0 interrupt by finish receiving. UNIT: 8bit LSB first Baud rate selection : fSYS/8 Synchronous clock edge: Rising
Setting example
ld ld (pdfc),0x07 (pdcr),0x06 ; Port setting PD0:HSSI0, PD1:HSSO0, PK7:HSCLK0 ; Port setting PD0:HSSI0, PD1:HSSO0, PK7:HSCLK0
ldw ldw
(hsc0ct),0x0040 (hsc0md),0x2c43
; Set data length to 8bit ; System clock enable, baud rate selection : fSYS/8 ; LSB first, synchronous clock edge setting: set to Rising
ld ld ei
(hsc0ie),0x01 (inteahsc0),0x10
; Set to RFR0 interrupt enable ; Set INTHSC0 interrupt level to 1 ; Interrupt enable (iff=0)
set
0x0,(hsc0ct)
; Start UNIT receiving
HSC0CT Write pulse HSCLK0 output HSSI0 input INTHSC0 Interrupt signal HSC0RD data
XX
0x3A
Figure 3.12.42 Example of UNIT receiving
92CM27-332
2005-04-20
TMP92CM27
(3) Sequential transmission This example show case of transmission is executed by following setting, and it is executed 2byte sequential transmission. UNIT: 8bit LSB first Baud rate selection: fSYS/8 Synchronous clock edge: Rising
Setting example
ld ld (pdfc),0x07 (pdcr),0x06 ; Port setting PD0:HSSI0, PD1:HSSO0, PK7:HSCLK0 ; Port setting PD0:HSSI0, PD1:HSSO0, PK7:HSCLK0
ldw ldw
(hsc0ct),0x0040 (hsc0md),0x2c43
; Set data length to 8bit ; System clock enable, baud rate selection: fSYS/8 ; LSB first, synchronous clock edge setting: set to Rising
loop1: bit jr 1,(hsc0st) z,loop1
; Confirm that transmission data register doesn't have no transmission data ; =1 ?
ld
(hsc0td),0x3a
; Write transmission data of first byte and start transmission
loop2 bit jr 1,(hsc0st) z,loop2
; Confirm that transmission data register doesn't have no-transmission data ; =1 ?
ld
(hsc0td),0x55
; Write transmission data of second byte
loop3: bit jr 3,(hsc0st) z,loop3
; Confirm that transmission data register doesn't have no-transmission data ; =1 ? ; Finish transmission
HSC0TD Write pulse HSCLK0 output HSSO0 output INTHSC0 (RFW0) Interrupt signal
Note: Timing of this figure is an example. There is also that transmission interbal between first byte and sescond byte generate. (High baud rate etc.)
Figure 3.12.43 Example of sequential transmission
92CM27-333
2005-04-20
TMP92CM27
(4) Sequential receiving This example show case of receiving is executed by following setting, and it is executed 2byte sequential receiving. UNIT: 8bit LSB first Baud rate selection: fSYS/8 Synchronous clock edge: Rising
Setting example
ld ld (pdfc),0x07 (pdcr),0x06 ; Port setting PD0:HSSI0, PD1:HSSO0, PD2:HSCLK0 ; Port setting PD0:HSSI0, PD1:HSSO0, PD2:HSCLK0
ldw ldw
(hsc0ct),0x0040 (hsc0md),0x2c43
; Set data length to 8bit ; System clock enable, baud rate selection: fSYS/8 ; LSB first, synchronous clock edge setting: set to Rising
set
0x01,(hsc0ct)
; Start sequential receiving
loop1: bit jr 0,(hsc0st) z,loop1
; Confirm that receiving data register has receiving data of first byte ; =1 ?
loop2: bit jr 2,(hsc0st) z,loop2
; Confirm that receiving data register has receiving data of second byte ; =1 ?
res
0x01,(hsc0ct)
; Sequential receiving disable
ld
a,(hsc0rd)
; Read receiving data of first byte
loop3:
; Confirm that receiving data of second byte is shifted from receiving data shift register to receiving data register
bit jr ld
0,(hsc0st) z,loop3 w,(hsc0rd)
; =1 ?
; Read receiving data of second byte
HSC0RD Read pulse HSCLK output HSSI0 input HSC0RS data HSC0RD data
XX XX 0x3A
0x55 0x55
Figure 3.12.44 Example of sequential receiving
92CM27-334
2005-04-20
TMP92CM27
(5) Sequeintial Transmission by using micro DMA This example show case of sequential transmission of 4byte is executed at using micro DMA by following setting. UNIT: 8bit LSB first Baud rate : fSYS/8 Synchronous clock edge: Rising
Setting example Main routine ;-- micro DMA setting -ld ld ldc ld ldc (dma0v),0x25 wa,0x0003 dmac0,wa a,0x08 dmam0,a ; micro DMA mode setting: source INC mode, 1 byte transfer ; Set micro DMA0 to INTHSC0 ; Set number of micro DMA transmission to that number -1 (third time)
ld ldc ld ldc
xwa,0x806000 dmas0,xwa xwa,0xC10 dmad0,xwa
; Set source address
; Set source address to HSC0TD register
;-- SPIC setting -ld ld (pdfc),0x07 (pdcr),0x06 ; Port setting PD0:HSSI0, PD1:HSSO0, PK7:HSCLK0 ; Port setting PD0:HSSI0, PD1:HSSO0, PK7:HSCLK0
ldw ldw
(hsc0ct),0x0040 (hsc0md),0x2c43
; Set data length to 8bit ; System clock enable, baud rate selection: fSYS/8 ; LSB first, synchronous clock edge setting: set to Rising
ld set ld ei
(hsc0ie),0x00 1,(hsc0ct+1) (intetc01),0x01
;Set to interrupt disable ; Set micro DMA operation by RFW0 to enable ; Set INTTC0 interrupt level to 1 ; Interrupt enable (iff=0)
loop1: bit jr 1,(hsc0st) z,loop1
; Confirm that transmission data register doesn't have no transmission data ; =1 ?
ld
(hsc0td),0x3a
; Write Transmission data and Start transmission
Interrupt routine (INTTC0)
loop2: bit jr bit jr nop 1,(hsc0st) z,loop2 3,(hsc0st) z,loop2 ; = 1 ? ; = 1 ?
92CM27-335
2005-04-20
TMP92CM27
(6) UNIT receiving by using micro DMA This example show case of UNIT receiving sequentially 4byte is executed at using micro DMA by following setting. UNIT: 8bit LSB first Baud rate : fSYS/8 Synchronous clock edge: Rising
Setting example Main routine ;-- micro DMA setting -ld ld ldc ld ldc (dma0v),0x25 wa,0x0003 dmac0,wa a,0x00 dmam0,a ; micro DMA mode setting: source INC mode, 1 byte transfer ; Set micro DMA0 to INTHSC0 ; Set number of micro DMA transmission to that number -1 (third time)
ld ldc ld ldc
xwa,0xC12 dmas0,xwa xwa,0x807000 dmad0,xwa
; Set source address to HSC0RD register
; Set source address
;-- SPIC setting -ld ld (pdfc),0x07 (pdcr),0x06 ; Port setting PD0:HSSI0, PD1:HSSO0, PD2:HSCLK0 ; Port setting PD0:HSSI0, PD1:HSSO0, PD2:HSCLK0
ldw ldw
(hsc0ct),0x0040 (hsc0md),0x2c43
; Set data length to 8bit ; System clock enable, baud rate selection: fSYS/8 ; LSB first, synchronous clock edge setting: set to Rising
ld set ld ei
(hsc0ie),0x00 0,(hsc0ct+1) (intetc01),0x01
; Set to interrupt disable ; Set micro DMA operation by RFR0 to enable ; Set INTTC0 interrupt level to 1 ; Interrupt enable (iff=0)
set
0x0,(hsc0ct)
; Start UNIT receiving
Interrupt routine (INTTC0)
loop2: bit jr res ld nop 0,(hsc0st) z,loop2 0,(hsc0ct) a,(hsc0rd) ; UNIT receiving disable ; Read last receiving data ; Wait receiving finish case of UNIT receiving ; = 1 ?
92CM27-336
2005-04-20
TMP92CM27
3.13 SDRAM Controller (SDRAMC)
TMP92CM27 includes SDRAM controller which supports SDRAM access by CPU. The features are as follows. (1) Support SDRAM
Data rate type: Bulk of memory: Number of banks: Width of data bus: Read burst length: Write mode: Only SDR (Single data rate) type 16/64 Mbits 2/4 banks 16 bit 1 word/full page Single/burst
(2) Support Initialize sequence command
All banks precharge command 8 times auto refresh command Mode Register setting command
(3) Access mode CPU Access
Read burst length Addressing mode CAS latency (clock) Write mode 1 word/full page Sequential 2 Single/burst
(4) Access cycle
CPU Access (Read/write) Read cycle: Write cycle: Data size: 1 word- 4 states/full page - 1 state Single - 3 states/burst - 1 state 8 bits/16 bits/32 bits
(5) Refresh cycle auto generate * Auto refresh is generated during except SDRAM access. * Refresh interval is programmable. * Self refresh is supported
Note 1: Condition of SDRAM's area set by CS3 setting of memory controller.
92CM27-337
2005-04-20
TMP92CM27
3.13.1
Control Registers
Figure 3.13.1 shows the SDRAMC control registers. Setting these registers controls the operation of SDRAMC. SDRAM Access Control Register 1 7 6
- 0 Always write "0"
5
SMRD 0 Mode register recovery time 0: 1 clock 1: 2 clocks
4
SWRC R/W 0 Write recovery time 0: 1 clock 1: 2 clocks
3
SBST 0 Burst stop command
0: Precharge all 1: Burst stop
2
SBL1 1
1
SBL0 0
0
SMAC 0 SDRAM controller
SDACR1 (0250H)
Bit symbol Read/Write After reset Function
- 0 Always write "0"
Select burst length (Note 1)
0: Disable 00: Reserved 01: Full-page read, burst 1: Enable write 10: 1-word read, single write 11: Full-page read, single write
Note 1:
Execute the mode register setting command after changing . If change from "full-page read" to "1-word read", take care setting. Please refer to "3.13.3 4) Limitation point to use SDRAM".
SDRAM Access Control Register 2 7
SDACR2 (0251H) Bit symbol Read/Write After reset Function 0 Number of banks 0: 2 banks 1: 4 banks 0
6
5
4
SBS
3
SDRS1
2
SDRS0 R/W 0
1
SMUXW1 0
0
SMUXW0 0
Select ROW address size 00: 2048 rows (11 bits) 01: 4096 rows (12 bits) 10: 8192 rows (13 bits) 11: Reserved
Select address multiplex type 00: TypeA (A9-) 01: TypeB (A10-) 10: TypeC (A11-) 11: Reserved
SDRAM Refresh Control Register 7
SDRCR (0252H) Bit symbol Read/Write After reset Function - R/W 0 Always write "0". 1 SR Auto Exit function 0: Disable 1: Enable 0 Refresh interval 000: 47 states 001: 78 states 010: 97 states 011: 124 states
6
5
4
SSAE
3
SRS2
2
SRS1 R/W 0
1
SRS0 0
0
SRC 0 Auto refresh 0: Disable 1: Enable
100: 156 states 101: 195 states 110: 249 states 111: 312 states
92CM27-338
2005-04-20
TMP92CM27
SDRAM Command Register 7
SDCMM (0253H) Bit symbol Read/Write After reset Function 0
6
5
4
3
2
SCMM2
1
SCMM1 R/W 0
0
SCMM0 0
Command executing (Note 1) (Note 2) 000: Not execute 001: Execute initialize command a. Precharge all banks b. 8 times auto refresh c. Set mode register 100: Set mode register 101: Execute self refresh Entry 110: Execute self refresh EXIT Others: Reserved is cleared to "000" after a command is executed. But is not cleared by executing the self refresh Entry command. It is cleared by executing the self refresh Exit command.
Note 1:
Note 2:
When command except the self refresh Exit command is executed, write command after checking that are "000".
Figure 3.13.1 SDRAM Control Registers
92CM27-339
2005-04-20
TMP92CM27
3.13.2
Operation Description
(1) Memory access control Access controller is enabled when SDACR1 = 1. And then SDRAM control signals ( SDCS , SDRAS , SDCAS , SDWE , SDLLDQM, SDLUDQM, SDCLK and SDCKE) are operating during the time CPU accesses CS3 area.
In the access cycle, outputs row/column multiplex address through A0 to A15 pin. And multiplex width is decided by setting SDACR2. The relation between multiplex width and row/column address is shown in Table.
Table 3.13.1 Address Multiplex TMP92CM27 Pin Name Address of SDRAM Access Cycle Row Address Column Address
TypeA TypeB TypeC 16-Bit Data Bus Width 32-Bit Data Bus Width "00" "01" "10" B1CSH = "01" B1CSH = "10"
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 EA25 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 EA25 EA26 Row address A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 AP A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 AP
Burst length of SDACR1.
SDRAM
read/write
by
CPU
can
be
select by
setting
SDRAM access cycle is shown in Table 3.13.2 and Table 3.13.3. SDRAM access cycle number is not depending on B3CSL registers setting. In the full page burst read/write cycle, a mode register set cycle and a precharge cycle are inserted automatically to cycle front and back. (2) Instruction executing on SDRAM CPU can be executed instructions that are asserted to SDRAM. However, below function is not operated. a) b) Executing HALT instruction Executing instructions that write to SDCMM register
When the above mentioned is operated, it is necessary to execute it by another memory such as built-in RAM.
92CM27-340
2005-04-20
TMP92CM27
85 states (320-byte read) SDCLK SDCKE SDLUDQM SDLLDQM
SDCS SDRAS SDCAS
SDWE
A10 A15 to A0 D15 to D0 RA RA
CA (n) CA (n + 2) CA (n + 4) CA (n + 6) D (n) D (n + 2) D (n + 4) (n + 316) D (n + 6) (n + 318) D (n + 316) D (n + 318)
Bank active
Read
All banks precharge
Figure 3.13.2 Timing of Burst Read Cycle
3 states SDCLK SDCKE SDLUDQM SDLLDQM
SDCS
SDRAS
SDCAS
SDWE
A10 A15 to A0 D15 to D0 RA RA OUT Bank active Write with precharge Internal precharge CA CA
Figure 3.13.3 Timing of CPU Write Cycle (Structure of Data Bus: 16 bits x 1, operand Size: 2 bytes, address: 2n + 0)
92CM27-341
2005-04-20
TMP92CM27
(3) Refresh control This LSI supports two refresh commands of auto refresh and self refresh. (a) Auto refresh The auto refresh command is generated intervals that set to SDRCR automatically by setting SDRCR to "1". The generation interval can be set between 47 to 312 states (2.4 s to 15.6 s at fSYS = 20 MHz). CPU operation (instruction fetch and execution) stops while performing the auto refresh command. The auto refresh cycle is shown in Figure 3.13.4 and the auto refresh generation interval is shown in Table 3.13.2. Auto self refresh doesn't operate at IDLE1 mode and STOP mode. It can be used only with CPU operation NORMAL mode or IDLE2 mode.
2 states SDCLK SDCKE SDLUDQM SDLLDQM
SDCS SDRAS
SDCAS SDWE
Auto refresh
Figure 3.13.4 Timing of Auto Refresh Cycle
Table 3.13.2 Refresh Cycle Insertion Interval SDRCR SRS2
0 0 0 0 1 1 1 1
(Unit: s)
SRS1
0 0 1 1 0 0 1 1
SRS0
0 1 0 1 0 1 0 1
Insertion Interval (State)
47 78 97 124 156 195 249 312
fSYS Frequency (System clock) 6 MHz
7.8 13.0 16.2 20.7 26.0 32.5 41.5 52.0
10 MHz 12.5 MHz 15 MHz 17.5 MHz 20 MHz
4.7 7.8 9.7 12.4 15.6 19.5 24.9 31.2 3.8 6.2 7.8 9.9 12.5 15.6 19.9 25.0 3.1 5.2 6.5 8.3 10.4 13.0 16.6 20.8 2.7 4.5 5.5 7.1 8.9 11.1 14.2 17.8 2.4 3.9 4.9 6.2 7.8 9.8 12.4 15.6
92CM27-342
2005-04-20
TMP92CM27
(b) Self refresh The self refresh command is generated by making it to SDCMM to "101". The self refresh cycle is shown in Figure 3.13.5. During self refresh Entry, refresh is performed inside SDRAM (an auto refresh command is not needed).
Note 1: When stand-by mode is cancelled by a reset, the I/O registers are initialized, therefore, auto refresh is not performed. Note 2: During self refresh Entry, it cannot be accessed to SDRAM. Note 3: After the self refresh Entry command, shift CPU to IDLE1 or STOP mode. When during setting HALT instruction and SDCMM to "101", execute NOP (more than 10 bytes) or another instructions.
SDCLK SDCKE
SDLUDQM SDLLDQM
SDCS SDRAS
SDCAS SDWE
Self refresh Entry
Self refresh Exit
Auto refresh
Figure 3.13.5 Timing of Self Refresh Cycle
92CM27-343
2005-04-20
TMP92CM27
Self-Refresh condition is released by executing Serf-Refresh command. Way to execute Self-Refresh EXIT command is 2 ways: write "110" to SDCMM, or execute EXIT automatically by synchronizing to releasing HALT condition. Both ways, after it executes Auto-Refresh at once just after Self-Refresh EXIT, it executes Auto-Refresh at setting condition. When it became EXIT by writing "110" to , is cleared to "000". EXIT command that synchronize to release HALT condition can be prohibited by setting SDRCR to "0". If don't set to EXIT automatically, set to prohibit. If using condition of SDRAM is satisfied by operation clock frequency (clock gear down, SLOW mode condition and so on) is falling, set to prohibit. Figure 3.13.6 shows execution flow in this case.
Gear-down or Change to Low clock fSYS 20MHz 32KHz CPU Auto Exit enable SR EXIT
Change CLK HALT
Gear-up or Change to High clock
Interrupt
Change CLK
SR EXIT
Auto Exit enable
HALT condition SDRAM controller internal condition Auto Exit enable Auto Exit disable Auto Exit enable
SDRAM condition AR condition SR condition AR condition
Figure 3.13.6 Execution flow example (Execute HALT instruction at low-speed clock).
92CM27-344
2005-04-20
TMP92CM27
; ********Sample program ********* LOOP1: LDB ANDB J A, (SDCMM) A, 00000111B NZ, LOOP1 ; ; ; Check the command register clear
LDW NOPx10 LD HALT NOP
(SDRCR), 0000010100000011B
; ;
Auto Exit disable Self refresh Entry Wait Self refresh Entry command executing fc/2 Self refresh Exit (Internal signal only)
(SYSCR1), XXXXX001B
; ;
LD LD LD
(SYSCR1), XXXXX000B (SDCMM), 00000110B (SDRCR), 0001---1B
; ; ;
fc Self refresh Exit (command) Auto Exit enable
92CM27-345
2005-04-20
TMP92CM27
(4) SDRAM initialize After released reset, it can generate the following cycle that is needed to SDRAM. The cycle is shown in Figure 3.13.7. 1. Precharge all banks 2. The auto refresh cycle of 8 cycles 3. Set a Mode register The above cycle is generated by setting SDCMM to "001". While performing this cycle, operation (an instruction fetch, command execution) of CPU is stopped. In addition, before execute an initialization cycle, set port as SDRAM control signal and an address signal (A0 to A15). After the initialization cycle was finished, SDCMM is set to "000" automatically.
8 times refresh cycle SDCLK SDCKE SDLUDQM SDLLDQM
SDCS SDRAS SDCAS SDWE
A10 A15 to A0 627 227
Precharge Auto all banks refresh
Auto refresh
Auto refresh
Auto refresh
Auto refresh
Set mode register
Figure 3.13.7 Timing of Initialization Cycle
92CM27-346
2005-04-20
TMP92CM27
(5) Connection example The example of connection with SDRAM is shown in Table 3.13.3 and Figure 3.13.8.
Table 3.13.3 Connection with SDRAM
TMP92CM27 Pin Name 16 M
SDRAM Pin Name Data Bus Width: 16 Bits
64 M 128 M 256 M 512 M
A0 A0 A0 A0 A0 A0 A1 A1 A1 A1 A1 A1 A2 A2 A2 A2 A2 A2 A3 A3 A3 A3 A3 A3 A4 A4 A4 A4 A4 A4 A5 A5 A5 A5 A5 A5 A6 A6 A6 A6 A6 A6 A7 A7 A7 A7 A7 A7 A8 A8 A8 A8 A8 A8 A9 A9 A9 A9 A9 A9 A10 A10 A10 A10 A10 A10 A11 BS A11 A11 A11 A11 A12 BS0 BS0 A12 A12 - A13 - BS1 BS1 BS0 BS0 A14 BS1 BS1 - - - A15 - - - - - CS CS CS CS CS SDCS SDLUDQM UDQM UDQM UDQM UDQM UDQM SDLLDQM LDQM LDQM LDQM LDQM LDQM RAS RAS RAS RAS RAS SDRAS CAS CAS CAS CAS CAS SDCAS WE WE WE WE WE SDWE SDCKE CKE CKE CKE CKE CKE SDCLK CLK CLK CLK CLK CLK SDACR 00: 00: 01: 01: 10: TypeA TypeA TypeB TypeB TypeC (An) : Row address : Command address pin of SDRAM
TMP92CM27 SDCLK SDCKE A13 to A12 A11 to A0 D15 to D0
SDRAS SDCAS SDWE SDCS
CLK CKE BS1 to BS0 A11 to A0 D15 to D0
RAS CAS WE CS
SDLUDQM SDLLDQM
UDQM LDQM 1 M word x 4 Banks x 16 bits
Figure 3.13.8 Connection with SDRAM (4 M word x 16 bits)
92CM27-347
2005-04-20
TMP92CM27
3.13.3
Limitation point to use SDRAM
There are some points to notice when using SDRAMC. Please refer to the section under below and please be careful. 1. WAIT access When it uses SDRAM, some limitation is added if it access to memory except SDRAM. In N-WAIT setting of this LSI, if setting time is inserted as external WAIT, set time less than Auto Refresh cycle (Auto Refresh function that is controlled by SDRAM controller) x 8190. Execution of SDRAM command before HALT instruction (SR (Self refresh)-Entry, Initialize, Mode-set) When command that SDRAM controller has (SR-Entry, Initialize and Mode-set) is executed, execution time is needed few states. Therefore, when HALT instruction is executed after the SDRAM command, please insert NOP more than 10 bytes or other 10 instructions before executing HALT instruction. AR (Auto Refresh) interval time When using SDRAM, set CPU clock that satisfy minimum operation frequency for SDRAM and minimum refresh cycle. When SLOW mode is used by using SDRAM or it use system that clock gear may become down, consider AR cycle for SDRAM. When AR cycle is changed, set to disable by writing "0" to SDRCR. Note of when changing access mode If changing access mode from "full page read" to "1 word read", execute following program. This program must not execute on the SDRAM.
di ld ld ld ei a,(optional external memory address) (sdacr1),00001101b (sdcmm),0x04 ; Interrupt Disable (Added) ; Dummy read instruction (Added) ; Change to "1-word read" ; Execute MRS (mode register setting) ; Interrupt enable (Added)
2.
3.
4.
92CM27-348
2005-04-20
TMP92CM27
3.14 Analog/Digital Converter
The TMP92CM27 incorporates a 10-bit successive approximation-type analog/digital converter (AD converter) with 12-channel analog input. Figure 3.14.1 is a block diagram of the AD converter. The 12-channel analog input pins (AN0 to AN11) are shared with the input-only port M and port N so they can be used as an input port. Note: When IDLE2, IDLE1, or STOP mode is selected, as to reduce the power, with some timings the system may enter a standby mode even though the internal comparator is still enabled. Therefore be sure to check that AD converter operations are halted before a HALT instruction is executed.
Internal data bus
AD mode Control register 1,2 ADMOD2 ADMOD1
AD mode control register 0 ADMOD0

Decoder
Scan Repeat Interrupt Busy End Start AD Converter control circuit Interrupt Request INTAD ADTRG
Analog Input AN11/ADTRG (PN3) AN10 (PN2) AN9 (PN1) AN8 (PN0) Multiplexer AN7 (PM7) AN6 (PM6) AN5 (PM5) AN4 (PM4) AN3 (PM3) AN2 (PM2) AN1 (PM1) AN0 (PM0)
Channel Select
AD conversion result Sample hold - Comparater + register ADREG0L to ADREGBL ADREG0H to ADREGBH
AVCC(VREFH) AVSS(VREFL)
DA converter
Figure 3.14.1
Block Diagram of AD Converter
92CM27-349
2005-04-20
TMP92CM27
3.14.1 Analog/Digital Converter Registers
The AD converter is controlled by the three AD mode control registers: ADMOD0, ADMOD1, and ADMOD2. The 24 AD conversion data result registers (ADREG0H/L to ADREGBH/L) store the results of AD conversion. Figure 3.14.2 to Figure 3.14.6 shows the registers related to the AD converter. AD Mode Control Register 0 7
ADMOD0 (12B8H) Bit symbol Read/Write After reset Function 0 AD conversion end flag EOCF R 0 AD conversion busy flag 0 Always write "0". 0 Always write "0".
6
ADBF
5
-
4
-
3
ITM0 R/W 0 Interrupt specification in conversion channel fixed repeat mode
0: Every conversion 1: Every fourth conversion
2
REPEAT
1
SCAN
0
ADS
0 0 0 Repeat Scan mode AD mode specification conversion specification 0: Conversion start
0: Single conversion 1: Repeat conversion mode channel 0: Don't care fixed mode 1: Start conversion 1: Conversion Always channel scan mode when read. 0
0: Conversion 0: Conversion in progress stopped 1: Conversion 1: Conversion complete in progress
AD conversion start 0 1 Don't care Start AD conversion.
Note: Always read as 0. AD scan mode setting 0 1 AD conversion channel fixed mode AD conversion channel scan mode
AD repeat mode setting 0 1 AD single conversion mode AD repeat conversion mode
Specify AD conversion interrupt for channel fixed repeat conversion mode Channel fixed repeat conversion mode = "0", = "1" 0 1 Generates interrupt every conversion. Generates interrupt every fourth conversion.
AD conversion busy flag 0 1 AD conversion stopped AD conversion in progress
AD conversion in progress 0 1 Before or during AD conversion AD conversion complete
Figure 3.14.2
Register for AD Converter (1)
92CM27-350
2005-04-20
TMP92CM27
AD Mode Control Register 1 7
ADMOD1 (12B9H) bit Symbol Read/Write Function VREFON R/W
6
I2AD R/W
5
R/W
4
0 Always write "0".
3
ADCH3 0
2
ADCH2 R/W 0
1
ADCH1 0
0
ADCH0 0
0 0 0 Always VREF IDLE2 write "0". application 0: Stop 1: Operate control 0: OFF 1: ON
Analog input channel selection
Analog input channel selection ADMOD0 < ADCH3:0> 0000 0001 0010 0011 0100 0101 0110 0111 1000 0 Channel fixed AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN0 AN0 AN1 AN0 AN1 AN2 AN0 AN1 AN2 AN3 AN0 AN1 AN2 AN3 AN4 AN0 AN1 AN2 AN3 AN4 AN5 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11 Please do not set up. 1 Channel scanned
1001
AN9
1010
AN10
1011
AN11
11001111
IDLE2 control 0 1 Stop Operate
Control of application of reference voltage to AD converter 0 1 OFF ON
Note:
As pin AN11 also functions as the ADTRG input pin, do not set ADMOD1 ="1011" when using ADTRG with ADMOD2 set to "1". Figure 3.14.3 Register for AD Converter (2)
92CM27-351
2005-04-20
TMP92CM27
AD Mode Control Register 2 7
ADMOD2 (12BAH) Bit symbol Read/Write After reset Function 0 All ways write "0". -
6
-
5
-
4
-
3
-
2
-
1
-
0
ADTRGE R/W 0
AD conversion trigger start control 0: Disable 1. Enable
AD conversion start control by external trigger ( ADTRG input ) 0 1 Disabled Enabled
Figure 3.14.4
Register for AD Converter (3)
92CM27-352
2005-04-20
TMP92CM27
AD conversion result register Low
ADREG0L (12A0H) ADREG1L (12A2H) ADREG2L (12A4H) ADREG3L (12A6H) ADREG4L (12A8H) ADREG5L (12AAH) ADREG6L (12ACH) ADREG7L (12AEH) ADREG8L (12B0H) ADREG9L (12B2H) ADREGAL (12B4H) ADREGBL (12B6H) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset
7
ADR01 R
6
ADR00
5
4
3
2
1
0
ADR0RF R 0 ADR1RF R 0 ADR2RF R 0 ADR3RF R 0 ADR4RF R 0 ADR5RF R 0 ADR6RF R 0 ADR7RF R 0 ADR8RF R 0 ADR9RF R 0 ADRARF R 0 ADRBRF R 0
Undefined
ADR11 R ADR10
Undefined
ADR21 R ADR20
Undefined
ADR31 R ADR30
Undefined
ADR41 R ADR40
Undefined
ADR51 R ADR50
Undefined
ADR61 R ADR60
Undefined
ADR71 R ADR70
Undefined
ADR81 R ADR80
Undefined
ADR91 R ADR90
Undefined
ADRA1 R ADRA0
Undefined
ADRB1 R ADRB0
Undefined
Stores lower 2 bits of AD conversion result 1
9 8 7 6 5 4 3 2 1 0
AD conversion data storage flag
Conversion result stored
Channel x conversion result
ADREGxH 7 6 ADREGxL 1 0
5
4
3
2
1
0
7
6
5
4
3
2
Bits 5 to 1 are always read as 1.
Bit0 is the AD conversion data storage flag . When the AD conversion result is stored, the flag is set to 1. When either of the registers (ADREGxH, ADREGxL) is read, the flag is cleared to 0.
Figure 3.144.5
Register for AD Converter (4)
92CM27-353
2005-04-20
TMP92CM27
AD conversion result register High
ADREG0H (12A1H) ADREG1H (12A3H) ADREG2H (12A5H) ADREG3H (12A7H) ADREG4H (12A9H) ADREG5H (12ABH) ADREG6H (12ADH) ADREG7H (12AFH) ADREG8H (12B1H) ADREG9H (12B3H) ADREGAH (12B5H) ADREGBH (12B7H) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset
7
ADR09
6
ADR08
5
ADR07
4
ADR06 R
3
ADR05
2
ADR04
1
ADR03
0
ADR02
Undefined
ADR19 ADR18 ADR17 ADR16 R ADR15 ADR14 ADR13 ADR12
Undefined
ADR29 ADR28 ADR27 ADR26 R ADR25 ADR24 ADR23 ADR22
Undefined
ADR39 ADR38 ADR37 ADR36 R ADR35 ADR34 ADR33 ADR32
Undefined
ADR49 ADR48 ADR47 ADR46 R ADR45 ADR44 ADR43 ADR42
Undefined
ADR59 ADR58 ADR57 ADR56 R ADR55 ADR54 ADR53 ADR52
Undefined
ADR69 ADR68 ADR67 ADR66 R ADR65 ADR64 ADR63 ADR62
Undefined
ADR79 ADR78 ADR77 ADR76 R ADR75 ADR74 ADR73 ADR72
Undefined
ADR89 ADR88 ADR87 ADR86 R ADR85 ADR84 ADR83 ADR82
Undefined
ADR99 ADR98 ADR97 ADR96 R ADR95 ADR94 ADR93 ADR92
Undefined
ADRA9 ADRA8 ADRA7 ADRA6 R ADRA5 ADRA4 ADRA3 ADRA2
Undefined
ADRB9 ADRB8 ADRB7 ADRB6 R ADRB5 ADRB4 ADRB3 ADRB2
Undefined
Stores Higher 8 bits of AD conversion result
9 8 7 6 5 4 3 2 1 0
Channel x conversion result
ADREGxH 7 6 ADREGxL 1 0
5
4
3
2
1
0
7
6
5
4
3
2
Bits 5 to 1 are always read as 1.
Bit0 is the AD conversion data storage flag . When the AD
conversion result is stored, the flag is set to 1. When either of the registers (ADREGxH, ADREGxL) is read, the flag is cleared to 0.
Figure 3.14.6
Register for AD Converter (5)
92CM27-354
2005-04-20
TMP92CM27
3.14.2 Description of Operation
(1) Analog reference voltage A high-level analog reference voltage is applied to the AVCC pin; a low-level analog reference voltage is applied to the AVSS pin. To perform AD conversion, the reference voltage, the difference between AVCC and AVSS, is divided by 1024 using string resistance. The result of the division is then compared with the analog input voltage. To turn off the switch between AVCC and AVSS, program a 0 to ADMOD1 in AD mode control register 1. To start AD conversion in the OFF state, first write a 1 to ADMOD1, wait 3 s until the internal reference voltage stabilizes (This is not related to fc), then set ADMOD0 to 1. (2) Analog input channel selection The analog input channel selection varies depends on the operation mode of the AD converter. * In analog input channel fixed mode (ADMOD0 = "0") Setting ADMOD1 selects one of the input pins AN0 to AN11 as the input channel. * In analog input channel scan mode (ADMOD0 = 1) Setting ADMOD1 selects one of the 12 scan modes. Table 3.14.1 illustrates analog input channel selection in each operation mode. On a reset, ADMOD0 is cleared to "0" and ADMOD1 is initialized to "0000". Thus pin AN0 is selected as the fixed input channel. Pins not used as analog input channels can be used as standard input port pins. Table 3.14.1
0000 0001 0010 0011 0100 0101 0110 0111 1000
Analog Input Channel Selection Channel scan = "1"
AN0 AN0 AN1 AN0 AN1 AN2 AN0 AN1 AN2 AN3 AN0 AN1 AN2 AN3 AN4 AN0 AN1 AN2 AN3 AN4 AN5 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11
Channel fixed = "0"
AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8
1001
AN9
1010
AN10
1011
AN11
92CM27-355
2005-04-20
TMP92CM27
(3) Starting AD conversion To start AD conversion, program "1" to ADMOD0 in AD mode control register 0, or ADMOD2 in AD mode control register 1 and input falling edge on ADTRG pin. When AD conversion starts, the AD conversion busy flag ADMOD0 will be set to "1", indicating that AD conversion is in progress. (4) AD conversion modes and the AD conversion end interrupt The four AD conversion modes are: * Channel fixed single conversion mode * Channel scan single conversion mode * Channel fixed repeat conversion mode * Channel scan repeat conversion mode The ADMOD0 and ADMOD0 settings in AD mode control register 0 determine the AD mode setting. Completion of AD conversion triggers an INTAD conversion end interrupt request. Also, ADMOD0 will be set to "1" to indicate that AD conversion has been completed. a. Channel fixed single conversion mode Setting ADMOD0 and ADMOD0 to "00" selects conversion channel fixed single conversion mode. In this mode data on one specified channel is converted once only. When the conversion has been completed, the ADMOD0 flag is set to "1", ADMOD0 is cleared to "0", and an INTAD interrupt request is generated. b. Channel scan single conversion mode Setting ADMOD0 and ADMOD0 to "01" selects conversion channel scan single conversion mode. In this mode data on the specified scan channels is converted once only. When scan conversion has been completed, ADMOD0 is set to "1", ADMOD0 is cleared to "0", and an INTAD interrupt request is generated.
92CM27-356
2005-04-20
TMP92CM27
c. Channel fixed repeat conversion mode Setting ADMOD0 and ADMOD0 to "10" selects conversion channel fixed repeat conversion mode. In this mode data on one specified channel is converted repeatedly. When conversion has been completed, ADMOD0 is set to "1" and ADMOD0 is not cleared to "0" but held at "1". INTAD interrupt request generation timing is determined by the setting of ADMOD0. Clearing to "0" generates an interrupt request every time an AD conversion is completed. Setting to "1" generates an interrupt request on completion of every fourth conversion. d. Channel scan repeat conversion mode Setting ADMOD0 and ADMOD0 to "11" selects conversion channel scan repeat conversion mode. In this mode data on the specified scan channels is converted repeatedly. When each scan conversion has been completed, ADMOD0 is set to "1" and an INTAD interrupt request is generated. ADMOD0 is not cleared to "0" but held at "1". To stop conversion in a repeat conversion mode (e.g., in cases c and d), program a "0" to ADMOD0. After the current conversion has been completed, the repeat conversion mode terminates and ADMOD0 is cleared to "0". Switching to a halt state (IDLE2 mode with ADMOD1 cleared to "0", IDLE1 mode or STOP mode) immediately stops operation of the AD converter even when AD conversion is still in progress. In repeat conversion modes (e.g., in cases c and d), when the halt is released, conversion restarts from the beginning. In single conversion modes (e.g., in cases a and b), conversion does not restart when the halt is released (The converter remains stopped). Table 3.14.2 shows the relationship between the AD conversion modes and interrupt requests.
Table 3.14.2
Relationship between the AD Conversion Modes and Interrupt Requests AD Interrupt Request Generation
After completion of conversion After completion of scan conversion Every conversion Every forth conversion After completion of every scan conversion
Mode
Channel fixed single conversion mode Channel scan single conversion mode Channel fixed repeat conversion mode Channel scan repeat conversion mode X: Don't care
ADMOD0
X X 0 1 X 0 0 1 1 0 1 0 1
92CM27-357
2005-04-20
TMP92CM27
(5) AD conversion time 99 states (4.95 s at fsys = 20 MHz) are required for the AD conversion of one channel. (6) Storing and reading the results of AD conversion The AD conversion data upper and lower registers (ADREG0H/L to ADREGBH/L) store the results of AD conversion. (ADREG0H/L to ADREGBH/L are read-only registers.) In channel fixed repeat conversion mode, the conversion results are stored successively in registers ADREG0H/L to ADREG3H/L. In other modes the AN0 to AN11 conversion results are stored in ADREG0H/L to ADREGBH/L respectively. Table 3.14.3 shows the correspondence between the analog input channels and the registers which are used to hold the results of AD conversion. Table 3.14.3 Correspondence between Analog Input Channel and AD Conversion Result Register Analog Input Channel
(Port G / Port L)
AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11
AD Conversion Result Register Conversion Modes Other than at Right
ADREG0H/L ADREG1H/L ADREG2H/L ADREG3H/L ADREG4H/L ADREG5H/L ADREG6H/L ADREG7H/L ADREG8H/L ADREG9H/L ADREGAH/L ADREGBH/L
ADREG3H/L ADREG2H/L ADREG0H/L ADREG1H/L
Channel Fixed Repeat Conversion Mode
(ADMOD0="1")
, bit0 of the AD conversion data lower register, is used as the AD conversion data storage flag. The storage flag indicates whether the AD conversion result register has been read or not. When a conversion result is stored in the AD conversion result register, the flag is set to "1". When either of the AD conversion result registers (ADREGxH or ADREGxL) is read, the flag is cleared to "0". Reading the AD conversion result also clears the AD conversion end flag ADMOD0 to "0".
92CM27-358
2005-04-20
TMP92CM27
Example: 1. Convert the analog input voltage on the AN3 pin and write the result, to memory address 2800H using the AD interrupt (INTAD) processing routine.
Setting of main routine 7 INTEPAD X ADMOD1 1 ADMOD0 X 6543210
---X100
1000011 X000001
Enable INTAD and set it to interrupt level 4. Set pin AN3 to the analog input channel. Start conversion in channel fixed single conversion mode. Read value of ADREG3L, ADREG3H to general purpose register WA (16 bits). Shift contents read into WA six times to right and zero-fill upper bits. Write contents of WA to memory address 2800H.
Interrupt routine processing example WA WA (2800H)
ADREG3H/L
>>6
WA
2.
Converts repeatedly the analog input voltages on the three pins AN0, AN1, and AN2, using channel scan repeat conversion mode.
INTEPAD X ADMOD1 1 ADMOD0 X X : Don't care,
---X000 1000010 X000111
Disable INTAD. Set pins AN0 to AN2 to be the analog input channels. Start conversion in channel scan repeat conversion mode.
- : No change
92CM27-359
2005-04-20
TMP92CM27
3.15 Digital/Analog Converter
8-bit resolution D/A converter of 2 channels is built into and it has the following features. * * * 8-bit resolution D/A converter with two internal channels. A full range Buffer AMP is built in each channel. The standby can be set to each channel by the control register.
3.15.1
Operation
Control register 0 DACnCNT0 is set to "11". Output CODE is set to output register DACnREG. And, the output voltage corresponding to CODE appears to output pin DAOUTn by doing "1" to Control register 1 DACnCNT1 in write. When is not set, the value of the output register is not reflected in DAOUTn. Therefore, set DACnCNT1 after the data of eight bits is updated without fail in DACnREG when you renew CODE. When "1" is written to , the data of DACnREG takes in to a DA converter as 8 bit data, and recognizes as CODE. Moreover, DACnCNT0 output DAOUTn becomes High-Z by setting it as "0". Iref is cut by setting DACnCNT0 to "0", and current consumption can be reduced. The setting of DACnCNT0 is needed before the HALT instruction is executed because the output voltage corresponding to CODE is output from output terminal DAOUTn after the HALT instruction is executed. FigureFigure 3.15.1 is block diagram if the D/A converter.
Note: From DAOUTn, "1" is outputted from from immediately after setting DACnCNT0 as "1." Then, the value set up by DACnREG is outputted from DAOUTn.
92CM27-360
2005-04-20
TMP92CM27
V CLR control
DACnCNT1
DACnREG 8
W
Internal DAREG (8 bit) 8 DAVSS
DAC Resistance part DAOUTn
Opn
Control
A M P
REFONn
DACnCNT0 DAVCC/DAREF System Diagram for DACn
Figure 3.15.1 D/A Converter Block Diagram
Control register 0 DAC0CNT0 register 7
DAC0CNT0 (12E3H) Bit Symbol Read/Write After reset Function
6
5
4
3
2
1
REFON0 R/W 0 0: Ref off 1: Ref on
0
OP0 R/W 0 0: Output High-Z 1: Output
Control register 0 DAC1CNT0 register 7
DAC1CNT0 (12E7H) Bit Symbol Read/Write After reset Function
6
5
4
3
2
1
REFON1 R/W 0 0: Ref off 1: Ref on
0
OP1 R/W 0 0: Output High-Z 1: Output
92CM27-361
2005-04-20
TMP92CM27
Control register 1 DAC0CNT1 7
DAC0CNT1 (12E1H) Bit Symbol Read/Write After reset Function - R/W 0 Always write "0"
6
- R/W 0 Always write "0"
5
- R/W 0 Always write "0"
4
- R/W 0 Always write "0"
3
2
1
0
VALID0 W 0 0: Don't care 1: Output CODE valid
Output register DAC0REG 7
DAC0REG (12E0H) Bit Symbol Read/Write After reset Function 0 0 0 0 DAC07
6
DAC06
5
DAC05
4
DAC04 R/W
3
DAC03 0
2
DAC02
1
DAC01 0
0
DAC00 0
0
Note: Write digital data and VALID in order of DAC0REG DAC0CNT1.
Control register 1 DAC1CNT1 7
DAC1CNT1 (12E5H) Bit Symbol Read/Write After reset Function - R/W 0 Always write "0"
6
- R/W 0 Always write "0"
5
- R/W 0 Always write "0"
4
- R/W 0 Always write "0"
3
2
1
0
VALID1 W 0 0: Don't care 1: Output CODE valid
Output register DAC1REG 7
DAC1REG (12E4H) Bit Symbol Read/Write After reset Function 0 0 0 0 DAC17
6
DAC16
5
DAC15
4
DAC14 R/W
3
DAC13 0
2
DAC12
1
DAC11 0
0
DAC10 0
0
Note: Write digital data and VALID in order of DAC1REG DAC1CNT1.
92CM27-362
2005-04-20
TMP92CM27
3.16
Watchdog Timer (Runaway detection timer)
The TMP92CM27 contains a watchdog timer of runaway detecting. The watchdog timer (WDT) is used to return the CPU to the normal state when it detects that the CPU has started to malfunction (Runaway) due to causes such as noise. When the watchdog timer detects a malfunction, it generates a non-maskable interrupt INTWD to notify the CPU of the malfunction, and outputs "0" from the watchdog timer out pin WDTOUT to notify peripheral devices of the malfunction. Connecting the watchdog timer output to the reset pin internally forces a reset.
3.16.1 Configuration
Figure 3.16.1 is a block diagram of the watchdog timer (WDT).
WDMOD Watchdog Timer out control
RESET pin
Internal reset
WDTOUT
Interrupt request INTWD WDMOD Selector 215 217 219 221 fSYS Binary counter (22-Stage) Reset Q R S
Internal reset Write 4EH Write B1H WDMOD
Watchdog timer register control register WDCR
Internal data bus
Figure 3.16.1
Block Diagram of Watchdog Timer
92CM27-363
2005-04-20
TMP92CM27
The watchdog timer consists of a 22-stage binary counter which uses the clock fSYS as the input clock. The binary counter can output 215/fSYS, 217/fSYS, 219/fSYS, and 221/fSYS. Selecting one of the outputs using WDMOD generates a watchdog timer interrupt and output watchdog timer out when an overflow generate as shown in Figure 3.16.2. Since the watchdog timer out pin ( WDTOUT ) outputs "0" when there is a watchdog timer overflow, the peripheral devices can be reset. Clearing the watchdog timer (writing the clear code (4EH) to the WDCR register) sets the WDTOUT pin to "1". In normal mode, the WDTOUT pin continually outputs "0" until the clear code is written to the WDCR register.
WDT counter WDT interrupt Clear WDT (Software)
WDTOUT pin
n
Overflow
0
Write clear code
Figure 3.16.2
Normal Mode
The runaway detection result can also be connected to the reset pin internally. In this case, the reset time will be between 22 to 29 system clocks (2.2 to 2.9 s at fSYS = 20 MHz) as shown in Figure 3.16.3.
Overflow WDT counter WDT interrupt Internal reset n
WDTOUT pin
22 to 29 system clocks (2.2 to 2.9 s at fSYS = 20 MHz)
Figure 3.16.3
Reset Mode
92CM27-364
2005-04-20
TMP92CM27
3.16.2
Control Registers
The watchdog timer WDT is controlled by two control registers WDMOD and WDCR . (1) Watchdog timer mode register (WDMOD) 1. Setting the detection time for the watchdog timer in This 2-bit register is used for setting the watchdog timer interrupt time used when detecting runaway. On a reset this register is initialized to WDMOD = "00". The detection time of the watch dog timer is shown in Figure 3.16.4. 2. Watchdog timer enable/disable control register At reset, the WDMOD is initialized to 1, enabling the watchdog timer. To disable the watchdog timer, it is necessary to clear this bit to 0 and to write the disable code (B1H) to the watchdog timer control register WDCR. This makes it difficult for the watchdog timer to be disabled by runaway. However, it is possible to return the watchdog timer from the disabled state to the enabled state merely by setting to "1". 3. Watchdog timer out reset connection This register is used to connect the output of the watchdog timer with the RESET terminal internally. Since WDMOD is initialized to "0" at reset, a reset by the watchdog timer will not be performed. (2) Watchdog timer control register (WDCR) This register is used to disable and clear the binary counter for the watchdog timer. * Disable control The watchdog timer can be disabled by clearing WDMOD to 0 and then writing the disable code (B1H) to the WDCR register.
WDMOD WDCR
0------- 10110001
Clear WDMOD to "0". Write the disable code (B1H).
* Enable control Set WDMOD to "1". * Watchdog timer clear control To clear the binary counter and cause counting to resume, write the clear code (4EH) to the WDCR register.
WDCR
01001110
Write the clear code (4EH).
92CM27-365
2005-04-20
TMP92CM27
7
WDMOD (1300H) Bit symbol Read/Write After reset Function 1 WDTE
6
WDTP1 R/W 0
5
WDTP0 0
4
-
0 Always write "0".
3
-
0 Always write "0".
2
I2WDT 0
1
RESCR R/W 0
0
-
0
WDT control WDT detection time 0: Disable 00: 215/fSYS 01: 217/fSYS 1: Enable 10: 219/fSYS 11: 221/fSYS
1: Internally Always IDLE2 connects write "0". 0: Stop WDT out 1: Operation to the reset pin.
Watchdog timer out control 0 1
-
Connects WDT out to a reset
IDLE2 control 0 1 Stop Operation
Watchdog timer detection time Gear 00 000 (fc) 001 (fc/2) 010 (fc/4) 011 (fc/8) 100 (fc/16) 1.638 ms 3.277 ms 6.554 ms 13.107 ms 26.214 ms
at fc = 40MHz Watch Dog Timer detection time WDMOD 01 6.554 ms 13.107 ms 26.214 ms 52.429 ms 104.857 ms 10 26.214 ms 52.429 ms 104.857 ms 209.715ms 419.430 ms 11 104.857 ms 209.715 ms 419.430 ms 838.860 ms 1.677 s
Watchdog timer enable/disable control 0 1 Disable Enable
Figure 3.16.4 Watchdog Timer Mode Register 7
WDCR (1301H) Read-modifywrite instruction is prohibited Bit symbol Read/Write After reset Function B1H: WDT disable code 4EH: WDT clear code WDT disable/clear control B1H 4EH Others Disable code Clear code Don't care
6
5
4
-
W
3
2
1
0
-
Figure 3.16.5 Watchdog Timer Control Register
92CM27-366
2005-04-20
TMP92CM27
3.16.3
Operation
After the detection time set by the WDMOD register is reached, the watchdog timer generates interrupt INTWD and outputs a low signal to the watchdog timer out pin WDTOUT . The binary counter for the watchdog timer must be cleared to 0 by software (Instruction) before INTWD is generated. If the CPU malfunctions (Runaway) due to causes such as noise and does not execute an instruction to clear the binary counter, the binary counter overflows and generates INTWD. The CPU interprets INTWD as a malfunction detection signal, which can be used to start the malfunction recovery program to return the system to normal. A CPU malfunction can also be fixed by connecting the watchdog timer output to a reset pin for peripheral devices. The watchdog timer begins operating immediately on release of the watchdog timer reset. The watchdog timer is reset and halted in IDLE1 or STOP modes. The watchdog counter continues counting during bus release ( BUSAK = Low). When the device is in IDLE2 mode, the operation of WDT depends on the WDMOD setting. Ensure that WDMOD is set before the device enters IDLE2 mode.
Example:
1. Clear the binary counter.
WDCR
01001110
17
Write the clear code (4EH).
2. Set the watchdog timer detection time to 2 /fSYS.
WDMOD
101X0---
3. Disable the watchdog timer.
WDMOD WDCR
0--X0--- 10110001
Clear bit to 0. Write the disable code (B1H).
92CM27-367
2005-04-20
TMP92CM27
3.17 External bus release function
TMP92CM27 have external bus release function that can connect bus master to external. Bus release request ( BUSRQ ), bus release answer ( BUSAK ) pin is assigned to Port 86 and 87. And, it become effective by setting to P8CR and P8FC. Figure 3.17.1 shows operation timing. Time that from BUSRQ pin inputted "0" until busis released ( BUSAK is set to "0") depend on instruction that CPU execute at that time.
fSYS BUSRQ (P86)
External bus BUSAK (P87) External bus pin (A type) External bus pin (B type) External bus pin (C type) External bus pin (D type) Pull-up registewr ON
Figure 3.17.1 Bus release function operation timing
3.17.1
Non release pin
If it received bus release request, CPU release bus to external by setting BUSAK pin to "0" without start next bus. In this case, pin that is released have 4 types (A, B, C and D). Eve operation that set to high impedance (HZ) is different in 4 types.(Note) Table 3.17.1 shows support pin for 4 types. Any pin become non release pin only case of setting to that function by setting port. Therefore, if pin set to output port and so on, it is not set non relase pin, and it hold previous condition. Table 3.17.1 Non release pin
Type A Eve operation that set to HZ Drive "1" Support function (Pin name) A23 to A16(P67 to P60), A15 to A8, A7 to A0, CS0 (P80), CS1 (P81), CS2 (P82), CS3 (P83), SDCS (P83), CS4 (P84), CS5 (P85), SDWE (P90), SDRAS (P91), SDCAS (P92), SDLLDQM(P93), SDLUDQM(P94), SDCLK(P96)
RD , WRLL (P71), WRLU (P72), R/ W (P73), SRWR (P74), SRLLB (P75), SRLUB (P76) SDCKE(P95) D15 to D8(P17 to P10), D7 to D0
B
C D
Drive "1"
Drive "0" None operation
Note ) Although the output buffer of RD , WRLL (P71), WRLU (P72), R/ W (P73), SRWR (P74), SRLLB (P75) and SRLUB (P76) is turned off at the time of bus release, a pull-up will be turned on and it will not become high impedance (HZ).
92CM27-368
2005-04-20
TMP92CM27
3.17.2
Connection example
Figure 3.17.2 show connection example.
TMP92CM27 CLE CLE ALE ALE Memory
External bus pin (A,B type) External bus pin (D type) External bus pin (C type)
External bus master BUSRQ BUSAK
Figure 3.17.2 Connection example
3.17.3
Note
If use bus release function, be careful following notes. 1) Prohibit using this function together SDRAM controller
Prohibitalso SDRAMC basically, but if external bus master use SDRAM, set SDRAM to SR (self refresh) condition before bus release request. And, when finish bus release, release SR condition. In this case, confirm each condition by handshake of general purpose port. 2) Support standby mode The condition that can receive this function is only CPU operationg condition and during IDLE2 mode. During IDLE1 and STOP condition don't receive. (Bus release function is ignored). 3) Internal resource access disable External bus master cannnot access to internal memory and interhal I/O of TMP92CM27. Internal I/O operation during bus releasing. 4) Internal I/O operation during bus releasing Internal I/O continue operation during bus releasing, please be careful. And, if set the watchdog timer, set runaway time by consider bus release time.
92CM27-369
2005-04-20
TMP92CM27
4. Electrical Characteristics 4.1 Maximum Ratings
Parameter Power Supply Voltage Input Voltage Output Current (1 pin) Output Current (1 pin) Output Current (total) Output Current (total) Power Dissipation (Ta=85) Soldering Temperature (10 s) Storage Temperature Operation Temperature Symbol VCC VIN IOL IOH IOL IOH PD TSOLDER TSTG TOPR Rating -0.5 to 4.0 -0.5 to VCC+0.5 2 -2 80 -80 600 260 -65 to 150 -40 to 85 Unit V V mA mA mA mA mW
Note: The maximum ratings are rated values that must not be exceeded during operation, even for an instant. Any one of the ratings must not be exceeded. If any maximum rating is exceeded, a device may break down or its performance may be degraded, causing it to catch fire or explode resulting in injury to the user. Thus, when designing products that include this device, ensure that no maximum rating value will ever be exceeded.
Point of note about solderability of lead free products (attach "G" to package name)
Test parameter Solderability Use of Sn-63Pb solder Bath Solder bath temperature = 230C, Dipping time = 5 seconds The number of times = one, Use of R-type flux Use of Sn-3.0Ag-0.5Cu solder bath Solder bath temperature = 245C, Dipping time = 5 seconds The number of times = one, Use of R-type flux (use of lead free) Pass: solderability rate until forming 95% Test condition Note
92CM27-370
2005-04-20
TMP92CM27
4.2
Symbol VCC
DC Electrical Characteristics
VCC = 3.3 0.3V / X1 = 4 to 40MHz / Ta = -40 to 85 Parameter Power Supply Voltage (DVCC=AVCC=DAVCC) (DVSS=AVSS=DAVSS=0V) Input Low Voltage for D0 to D7 P10 to P17(D8 to D15) Input Low Voltage for PC0 to PC1, PC3 to PC4, PD0, PL4 Input Low Voltage for P71 to P77, P86, P87, PA0 to PA5, PC2, PC5, PD1 to PD5, PF0 to PF7, PJ0 to PJ7, PK0 to PK7, PL0 to PL3, PL5 to PL7, PM0 to PM7, PN0 to PN3,
NMI , RESET
Input Low Voltage for AM0 to AM1 Input Low Voltage for X1 Input High Voltage for D0 to D7 P10 to P17(D8 to D15) Input High Voltage for 2.0
Min 3.0
Typ
Max 3.6
Unit V
Condition X1 = 6 to 10MHz (Note 1) X1 = 4 to 40MHz (Note 2)
VIL0
0.6
VIL1
0.3 x VCC
-0.3
0.25 x VCC
V
VIL2
VIL3 VIL4
0.3 0.2 x VCC
VIH0
VIH1
PC0 to PC1, PC3 to PC4, PD0, PL4 Input High Voltage for P71 to P77, P86, P87, PA0 to PA5, PC2, PC5, PD1 to PD5, PF0 to PF7, PJ0 to PJ7, PK0 to PK7, PL0 to PL3, PL5 to PL7, PM0 to PM7, PN0 to PN3,
NMI , RESET
0.7 x VCC
VIH2
0.75 x VCC
VCC + 0.3
V
VIH3
Input High Voltage for AM0 to AM1 Input High Voltage for X1
VCC - 0.3
VIH4
0.8 x VCC
Note 1) At the time of PLL use. Note 2) At the time of PLL un-use.
92CM27-371
2005-04-20
TMP92CM27
Symbol VOL VOL2 VOH ILI ILO VSTOP RRST RKH CIO Parameter Output Low Voltage Output Low Voltage for PC0 to PC1, PC3 to PC4 Output High Voltage Input Leakage Current Output Leakage Current Power Down Voltage at STOP (for initernal RAM back-up) Pull Up Resister for RESET Programmable Pull Up Resister for P70 to P72, P74 to P76 Pin Capacitance Schmitt Width for P71 to P77, P86, P87, PA0 to PA5, VTH PC2, PC5, PD1 to PD5, PF0 to PF7, PJ0 to PJ7, PK0 to PK7, PL0 to PL3, PL5 to PL7, PM0 to PM7, PN0 to PN3, NMI , RESET VTH2 Schmitt Width for PC0 to PC1, PC3 to PC4 NORMAL (Note 2) ICC IDLE2 IDLE1 STOP 0.2 50.0 25.0 7.5 0.2 60.0 31.5 11.5 50 mA VCC=3.6V, fc=40MHz(fsys=20MHz) VCC=3.6V V 0.4 1.0 V 10 pF fc=1MHz 80 500 K 1.8 2.4 0.02 0.05 Min Typ Max 0.45 0.45 V Unit IOL = 1.6mA IOL = 3.0mA IOH = -400A Condition
5 10
3.6
A A
V
0.0 Vin VCC 0.2 Vin VCC-0.2V VIL2 = 0.2*VCC, VIH2 = 0.8*VCC
A
Note 1: Typical values are for when Ta = 25C, Vcc = 3.3 V unless otherwise noted. Note 2: ICC NORMAL measurement conditions: All functions are operational; output pins except bus pin are open, and input pins are fixed. Bus pin CL=30pF.
92CM27-372
2005-04-20
TMP92CM27
4.3 AC Characteristics
4.3.1
Read cycle
VCC = 3.3 0.3V / fc = 4 to 40MHz / Ta = -40 to 85 No. 1 2 3 4 5-1 5-2 6-1 6-2 7-1 7-2 8 9 10 11 12 13 14 15 Parameter OSC period (X1/X2) System Clock period (=T) SDCLK Low Width SDCLK High Width A0 to A23 Valid D0 to D15 Input at 0WAIT A0 to A23 Valid D0 to D15 Input at 1WAIT Symbol tOSC tCYC tCL tCH tAD tAD3 tRD tRD3 tRR tRR3 tAR tRK tHA tHR tTK tKT tSBA tRRH 0.5T-15 1.5T-20 2.5T-20 0.5T-20 0.5T-20 0 0 20 5 1.5T-45 Variable Min 25 50 0.5T-15 0.5T-15 Max 250 500 fc=40MHz fsys=20MHz 25 50 10 10 50 100 30 80 55 105 5 5 0 0 20 5 40 10 fc=27MHz fsys=13.5MHz 37.0 74.0 22 22 --66 140 91 165 17 17 0 0 20 5 66 22 ns Unit
Basic Bus Cycle
2.0T-50 3.0T-50 1.5T-45 2.5T-45
RD Fall
D0 to D15 Input at 0WAIT
RD Fall
D0 to D15 Input at 1WAIT
RD Low Width at 0WAIT RD Low Width at 1WAIT
A0 to A23 Valid RD Fall
RD Fall SDCLK Rise A0 to A23 Valid D0 to D15 Hold RD Rise D0 to D15 Hold WAIT Set-up Time WAIT Hold Time Data Byte Control Access Time for SRAM RD High Width
Write cycle
VCC = 3.3 0.3V / fc = 4 to 40MHz / Ta = -40 to 85 No. 16-1 16-2 17-1 17-2 18 19 20 21 22 D0 to D15 Valid WRxx Rise at 0WAIT D0 to D15 Valid WRxx Rise at 1WAIT Parameter Symbol tDW tDW3 tWW tWW3 tAW tWK tWA tWD tRDO Variable Min 1.25T-35 2.25T-35 1.25T-30 2.25T-30 0.5T-20 0.5T-20 0.25T-5 0.25T-5 0.5T-5 Max fc=40MHz fsys=20MHz 27.5 77.5 32.5 82.5 5 5 7.5 7.5 20 fc=27MHz fsys=13.5MHz 57.5 131.5 62.5 136.5 17 17 13.5 13.5 -62.5 62.5 17 13.5 57.5 13.5 ns Unit
WRxx Low Width at 0WAIT WRxx Low Width at 1WAIT
A0 to A23 Valid WR Fall
WRxx Fall SDCLK Rise WRxx Rise A0 to A23 Hold WRxx Rise D0 to D15 Hold RD Rise D0 to D15 Output
32.5 23 Write Pulse Width for SRAM tSWP 1.25T-30 32.5 24 Data Byte Control to End of Write for SRAM tSBW 1.25T-30 5 25 Address Setup Time for SRAM tSAS 0.5T-20 7.5 26 Write Recovery Time for SRAM tSWR 0.25T-5 27.5 27 Data Setup Time for SRAM tSDS 1.25T-35 7.5 28 Data Hold Time for SRAM tSDH 0.25T-5 AC Measuring Condition Output level : High = 0.7Vcc, Low = 0.3Vcc, CL = 50pF Input level : High = 0.9Vcc, Low = 0.1Vcc
92CM27-373
2005-04-20
TMP92CM27 (1) Read cycle (0 wait, fc=fOSCH, fFPH=fc/1) tOSC X1 tCYC tCH SDCLK tCL
tTK
WAIT
tKT
A0 to A23 tAD
CSn
tHA R/ W
tAR
RD
tRK
tHR
tRRH
tRD D0 to D15
tRR
Data Input
tSBA
SRxxB SRWR
Note: The phase relation between X1 input signal and the other signals is undefined. The above timing chart is an example.
92CM27-374
2005-04-20
TMP92CM27 (2) Write cycle (0 wait, fc=fOSCH, fFPH=fc/1)
tOSC X1 tCYC tCH SDCLK tCL
tTK
WAIT
tKT
A0 to A23
CSn
R/ W tAW
WRxx
tWK
tWA
tWW tDW D0 to D15
tRDO
tSWR tWD
Data Output
RD
tSBW
SRxxB
tSDH
tSDS tSAS
SRWR
tSWP
Note: The phase relation between X1 input signal and the other signals is undefined. The above timing chart is an example.
92CM27-375
2005-04-20
TMP92CM27 (3) Read cycle (1 wait,fc=fOSCH,fFPH=fc/1) SDCLK
WAIT
A0 to A23 tAD3
CSn
R/ W
RD
tRR3
tRD3
D0 to D15
Data Input
(4) Write cycle (1 wait,fc=fOSCH,fFPH=fc/1)
SDCLK
WAIT
A0 to A23
CSn
R/ W
WRxx
tWW3 tDW3 D0 to D15
RD
tRDO
Data Output
92CM27-376
2005-04-20
TMP92CM27
4.3.2 Page ROM read cycle
(1) Page ROM Read Cycle (3-2-2-2 mode)
No Symbol Parameter Min 1 2 3 4 5 6 tCYC tAD2 tAD3 tRD3 tHA tHR System Clock Period (=T) A0,A1 D0 to D15 Input A2 to A23 D0 to D15 Input
RD Fall D0 to D15 Input
Variable Max 166.7 2.0T-50 3.0T-50 2.5T-45 0 0
40MHz
27MHz
Unit
50
50 50 100 80 0 0
74 98 172 140 0 0 ns
A0 to A23 Invalid D0 to D15 Hold
RD Rise D0 to D15 Hold
AC Measuring Condition Output level: High = 0.7Vcc, Low = 0.3Vcc, CL = 50pF Input level: High = 0.9Vcc, Low = 0.1Vcc
SDCLK tCYC A2 to A23
A0 to A1
+0
+1
+2
+3
CS 2
tHA tAD3 tAD2 tAD2 tAD2
RD
tRD3 D0 to D15
Data Input
tHA
Data Input
tHA
Data Input
tHA
Data Input
tHR
92CM27-377
2005-04-20
TMP92CM27
4.3.3 SDRAM Controller AC Characteristics
No 1 Symbol tRC Ref/Active Period 2 3 tRAS tRCD Active to Precharge Command Period Active to Read/Write Command Delay Time 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 tRP tRRD tWR tCK tCH tCL tAC tOH tDS tDH tAS tAH tCKS tCMS tCMH tRSC Precharge to Active Command Period Active to Active Command Period Write Recovery Time(CL*=2) CLK Cycle Time(CL*=2) CLK High Level Width CLK Low Level Width Access Time from CLK(CL*=2) Output Data Hold Time Data-in Set-up Time Data-in Hold Time Address Set-up Time Address Hold Time CKE Set-up Time Command Set-up Time Command Hold Time Mode Register Set Cycle Time 0 0.5T-10 T-15 0.75T-30 0.25T-9 0.5T-15 0.5T-15 0.5T-15 T T 3T T T 0.5T-15 0.5T-15 T-30 50 150 50 50 10 10 20 0 15 35 7.5 3.5 10 10 10 50 74 222 74 74 22 22 44 0 27 59 25.5 9.5 22 22 22 74 ns 2T T 12210 100 50 148 74 to Parameter Ref/Active Command Variable Min Max 2T 40MHz 100 27MHz 148 Unit
CL*: CAS latency. AC measuring conditions

Output level: High = 0.7 Vcc, Low = 0.3 Vcc, CL = 50 pF Input level: High = 0.9 Vcc, Low = 0.1 Vcc.
92CM27-378
2005-04-20
TMP92CM27 (1) SDRAM read timing (CPU access) tCK SDCLK tCH SDxxDQM
SDCS SDRAS SDCAS SDWE
tCL
tRP tCMS
tRCD
tRAS
tRP
tCMS tCMH
tCMH
tRRD
16-bit data bus
A1 to A10
tAS Row
tAH Column tAS tAH Column Column tAC tOH Data-in
A11 A12 to A15
Row Row
D0 to D15
92CM27-379
2005-04-20
TMP92CM27 (2) SDRAM write timing (CPU access) tCK SDCLK tCH SDxxDQM
SDCS SDRAS SDCAS SDWE
tCL
tRP tCMS
tRCD tCMS
tWR tRRD
tRP
tCMH tCMH tRAS
16-bit data bus
A1 to A12
tAS Row
tAH Column tAS tAH Column Column tDS tDH Data-out
A11 A12 to A15
Row Row
D0 to D15
92CM27-380
2005-04-20
TMP92CM27 (3) SDRAM burst read timing (Start of burst cycle) tCK SDCLK tCMS tRP tRCD tCMS
SDRAS SDCAS SDWE
SDxxDQM
SDCS
tCMH tCMS tCMH tCMH
tAS
A1 to A11 or A1 to A10 A12 or A11 A13 to A15 or A12 to A15
tAH
tAS Row Row
tAH
tAS Column Column
227
0
Row tAC tAC Data-in tOH tAC Data-in tOH Data-in
D0 to D15
92CM27-381
2005-04-20
TMP92CM27 (4) SDRAM burst read timing (End of burst cycle) tCK SDCLK tCMS SDxxDQM
SDCS SDRAS SDCAS SDWE
tRSC tCMH
tRC
tCMH tCMS
tCMS tCMH tAS
A1 to A11 or A1 to A10 A12 or A11 A13 to A15 or A12 to A15
Column Column Row tAC
220
Column Column
0 tAC Data-in Data-in tOH tOH
Column
D0 to D15
Data-in tOH
92CM27-382
2005-04-20
TMP92CM27 (5) SDRAM initialize timing
tCK SDCLK tCH SDxxDQM
SDCS SDRAS
tCL tCMS
tRSC
tRC
tCMS tCMS tCMH tCMH tAS tAH tAS 220 tCMH
SDCAS
SDWE
A1 to A12
A20 to A23 (BS0 and 1)
92CM27-383
2005-04-20
TMP92CM27 (6) SDRAM refresh timing tCK SDCLK tRC SDxxDQM tCMS tCMH
SDCS SDRAS SDCAS
tRC
SDWE
(7) SDRAM self refresh timing
tCK SDCLK tCKS SDCKE SDxxDQM
SDCS SDRAS SDCAS SDWE
tCKS
tRC
tCMS
tCMH
92CM27-384
2005-04-20
TMP92CM27
4.3.4 Serial Channel Timing
(1) SCLK input mode (I/O interface mode)
Parameter Symbol Min SCLK Cycle (Programmable) Output Data SCLK Rise/Fall SCLK Rise/Fall Output Data Hold SCLK Rise/Fall Input Data Hold SCLK Rise/Fall Input Data Hold Input Data Valid SCLK Rise/Fall tSCY tOSS tOHS tHSR tSRD tRDS 0 16X tSCY/2-4X-90 tSCY/2+2X+0 3X+10 tSCY-0 0 Variable Max fc=40MHz fsys=20MHz Min 0.4 10 250 85 400 0 Max fc=27MHz fsys=13.5MHz Min 0.59 58 370 121 592 ns Max s Unit
(2) SCLK output mode (I/O interface mode)
Parameter Symbol Min SCLK cycle (Programmable) Output Data SCLK Rise/Fall SCLK Rise/Fall Output Data Hold SCLK Rise/Fall Input Data Hold SCLK Rise/Fall Input Data Valid Input Data Valid SCLK Rise/Fall tSCY tOSS tOHS tHSR tSRD tRDS 1X+180 16X tSCY/2-40 tSCY/2-40 0 tSCY-1X-180 205 Variable Max 8192X fc=40MHz fsys=20MHz Min 0.4 160 160 0 195 217 Max 204 fc=27MHz fsys=13.5MHz Min 0.59 256 256 0 375 ns Max 303 s Unit
tSCY SCLK Output Mode/ Input Mode SCLK (Input Mode) OUTPUT DATA TXD tOSS 0 tRDS tSRD INPUT DATA RXD 0 Valid 1 Valid tHSR 2 Valid 3 Valid tOHS 1 2 3
92CM27-385
2005-04-20
TMP92CM27
4.3.5 Interrupts
Parameter Symbol Min INT0 to INTB, NMI tINTAL 4T+40 Variable Max fc=40MHz fsys=20MHz Min 240 Max fc=27MHz fsys=13.5MHz Min 336 ns tINTAH 4T+40 240 336 Max Unit
low level width
INT0 to INTB, NMI
high level width
4.3.6 AD Conversion Characteristics
Symbol AVCC AVSS AVIN ET Parameter AD Converter Power Supply Voltage AD Converter Ground Analog Input Voltage Total error (Quantize error of 0.5LSB is included) Note 1: Note 2: Note 3: 1LSB = (AVCC - AVSS)/1024 [V] Minimum frequency for operation Clock frequency which is selected by clock is over than 4MHz, operation is guaranteed. The value for ICC includes the current which flows through the AVCC pin. Min VCC VSS AVSS 1.0 Typ VCC VSS Max VCC VSS AVCC 4.0 LSB V Unit
4.3.7 DA Conversion Characteristics
Symbol DAOUT ET RL Parameter Output voltage range Total error Resistive load Note 1: Note 2: RL = 3.6 K RL = 3.6 K DAVSS+0.3 DAOUT DAVCC-0.3 3.6 Condition Min DAVSS+0.3 1.0 Typ Max DAVCC-0.3 4.0 Unit V LSB K
1LSB = (DAVCC - DAVSS)/256 [V] The value for ICC includes the current which flows through the DVCC pin.
92CM27-386
2005-04-20
TMP92CM27 4.3.8 Event Counter (TA0IN, TA2IN, TA4IN, TA6IN, TB0IN0, TB0IN1, TB1IN0, TB1IN1, TB2IN0, TB2IN1, TB3IN0, TB3IN1) Variable
fc = 40MHz fsys = 20MHz fc = 27MHz fsys = 13.5MHz
Parameter Clock period Clock low level width Clock high level width
Symbol tVCK tVCKL tVCKH
Unit ns ns ns
Min
8X+100 4X+40 4X+40
Max
Min
300 140 140
Max
Min
396 188 188
Max
Note: Symbol x in the above table means the period of clock fFPH, it's half period of the system clock fSYS for CPU core. The period of fFPH depends on the clock gear setting.
92CM27-387
2005-04-20
TMP92CM27 4.3.9
Symbol fPP tr tf tWL tWH tODS1 tODS2 tODH tIDS tIDH
High Speed SIO Timing
Parameter Variable Min Max 10 8 8 0.5X-8 0.5X-16 0.5X-18 0.5X-23 0.5X-10 0X+20 0X+5 40 MHz 10 8 8 42 34 32 27 40 20 5 36 MHz 9 8 8 47 39 37 32 45 20 5 27MHz 6.75 8 8 66 58 56 51 64 20 5 ns Unit MHz
HSCLK frequency ( = 1/X) HSCLK rising timing HSCLK falling time HSCLK Low pulse width HSCLK High pulse width Output data valid
HSCLK rise
Output data valid
HSCLK fall
HSCLK rise/fall
Output data hold
Input data valid
HSCLK rise/fall
HSCLK rise/fall
Input data hold
AC measuring conditions Output level Input level
: High = 0.7 VCC, Low = 0.2 VCC, CL = 25 pF : High = 0.9 VCC, Low = 0.1 VCC
fPP HSCLK output
(When HSMD="11")
0.7VCC 0.2VCC
HSCLK output
(When HSMD="00")
HSSO output
HSSI input
92CM27-388
2005-04-20
TMP92CM27
4.3.10 External bus release function
BUSRQ
(Note 1) BUSAK tBAA Release pin tABA (Note 2)
Variable Parameter Symbol Min Max
fc=40 MHz fsys=20MHz Min Max
Unit
Floating Floating
BUSAK BUSAK
falling rising
tABA tBAA
0 0
30 30
0 0
30 30
ns ns
Note 1: Even if the BUSRQ signal goes low, the bus will not be released while the WAIT signal is low. The bus will only be released when BUSRQ goes low while WAIT is high.
Note 2: This line shows only that the output buffer is in the off state. It does not indicate that the signal level is fixed. Just after the bu is released, the signal level set before the bus was released is maintained dynamically by the external capacitance. Therefore, to fix the signal level using an external resistor during bus release, careful design is necessary, as fixing of the level is delayed. The internal programmable pull-up/pull-down resistor is switched between the active and non-active states by the internal signal.
92CM27-389
2005-04-20
TMP92CM27
5 . Special Function Register
Special function register(SFR) is control of an input-and-output port and the control register of a circumference part, and it is assigned to 8 K bytes of address area of 000000H to 001FFFH.
(1) Input-and-Output port (2) Interrupt control (3) DMA controller (4) Memory controller (5) Clock control / PLL (6) SDRAM controller (7) 8-bit timer (8) 16-bit timer
(9) Pattern Generator (10) High speed serial channels (11) UART mode / Serial channels (12) I CBUS mode / Serial channels (13) AD converter (14) DA converter (15) Watch dog timer (16) Key-on wake up
2
Composition of a table Symbol Name Address 7 6 1 0 Symbol Read/Write The initial value at the time of reset Note Note1 "Prohibit RMW" of a table shows that it do not support read-modify-write operation for the register. Example) When only bit 0 of a P1CR register is set to "1",usually "SET 0,(0006H)", but It is necessary to write in this register to a 8-bit register by the "LD" (transfer) command for "Prohibit RMW".
The meaning of a sign R/W R W W* Prohibit RMW :Read/Write enable :Only Read enable :Only Write enable :Read Write enable (However, always read as "1") :Read-modify-write instruction is Prohibit ed (EX, ADD, ADC, BUS, SBC, INC,DEC,AND, OR, XOR, STCF, RES, SET, CHG, TEST, RLC, RRC, RL, RR, SLA,SRA, SLL, SRL, RLD, RRD instruction is disable) :Read-modify-write instruction is Prohibit ed in the case of pull-up control of the port.
Prohibit RMW*
92CM27 - 390
2005-04-20
TMP92CM27
Table 5. I/O Register Map
address
[1] Input-and-Output port
address
register name
address
register name
register name
address
register name
0000H 1H 2H 3H 4H P1 5H 6H P1CR 7H P1FC 8H 9H AH BH CH DH EH FH
0010H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
P6 P6CR P6FC P7 P7CR P7FC
0020H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
P8 P8CR P8FC P8FC2 P9 P9DR P9FC PA PAFC2 PACR PAFC
0030H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
PC PCFC2 PCCR PCFC PD PDFC2 PDCR PDFC
PF PFFC2 PFCR PFFC
address
register name
address
register name
0040H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
PJ PJFC2 PJCR PJFC
0050H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
PK PKFC2 PKFC PL PLFC2 PLCR PLFC PM
PMFC PN
PNFC
Note) Do not access address to which Register Name is not assigned. register is not assigned to the address.
92CM27 - 391
2005-04-20
TMP92CM27
[2] Interrupt control
address
[3] DMA controller
address
register name
register name
address
register name
address
register name
00D0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
INTE01 INTE23 INTE45 INTE67 INTETA01 INTETA23 INTE8TA45 INTE9TA67 INTES0 INTES1 INTES2 INTES3 INTESB0 INTESB1 INTEAHSC0 INTEBHSC1
00E0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
INTETB0 INTETB1 INTEPAD INTETB2 INTETB3 INTETB4 INTETB5 INTETBOX
INTNMWDT
00F0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
INTETC01 INTETC23 INTETC45 INTETC67 SIMC IIMC0 INTCLR IIMC1 IIMC2 BECSL BECSH EMUCR MSAREMU
0100H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
DMA0V DMA1V DMA2V DMA3V DMA4V DMA5V DMA6V DMA7V DMAB DMAR
INTSEL INTST IIMC3 IIMC4
[4] Memory controller
address
[5] Clock control / PLL
address
register name
register name
address
register name
address
register name
0140H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
B0CSL B0CSH MAMR0 MSAR0 B1CSL B1CSH MAMR1 MSAR1 B2CSL B2CSH MAMR2 MSAR2 B3CSL B3CSH MAMR3 MSAR3
0150H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
B4CSL B4CSH MAMR4 MSAR4 B5CSL B5CSH MAMR5 MSAR5 BEXCSL BEXCSH
0160H 1H 2H 3H 4H 5H 6H PMEMCR 7H 8H 9H AH BH CH DH EH FH
10E0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
SYSCR0 SYSCR1 SYSCR2 EMCCR0 EMCCR1 EMCCR2
PLLCR0 PLLCR1
92CM27 - 392
2005-04-20
TMP92CM27
[6] SDRAM controller
address
[7] 8-bit timer
address
register name
register name
address
register name
0250H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
SDACR1 SDACR2 SDRCR SDCMM
1100H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
TA01RUN TA0REG TA1REG TA01MOD TA1FFCR
TA23RUN TA2REG TA3REG TA23MOD TA3FFCR
1110H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
TA45RUN TA4REG TA5REG TA45MOD TA5FFCR
TA67RUN TA6REG TA7REG TA67MOD TA7FFCR
92CM27 - 393
2005-04-20
TMP92CM27
[8] 16-bit timer
address
register name
address
register name
address
register name
address
register name
1180H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
TB0RUN TB0MOD TB0FFCR
TB0RG0L TB0RG0H TB0RG1L TB0RG1H TB0CP0L TB0CP0H TB0CP1L TB0CP1H
1190H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
TB1RUN TB1MOD TB1FFCR
TB1RG0L TB1RG0H TB1RG1L TB1RG1H TB1CP0L TB1CP0H TB1CP1L TB1CP1H
11A0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
TB2RUN TB2MOD TB2FFCR
TB2RG0L TB2RG0H TB2RG1L TB2RG1H TB2CP0L TB2CP0H TB2CP1L TB2CP1H
11B0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
TB3RUN TB3MOD TB3FFCR
TB3RG0L TB3RG0H TB3RG1L TB3RG1H TB3CP0L TB3CP0H TB3CP1L TB3CP1H
address
register name
address
register name
11C0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
TB4RUN TB4MOD TB4FFCR
TB4RG0L TB4RG0H TB4RG1L TB4RG1H TB4CP0L TB4CP0H TB4CP1L TB4CP1H
11D0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
TB5RUN TB5MOD TB5FFCR
TB5RG0L TB5RG0H TB5RG1L TB5RG1H TB5CP0L TB5CP0H TB5CP1L TB5CP1H
92CM27 - 394
2005-04-20
TMP92CM27
[9] Pattern Generator
address
register name
1460H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
PG0REG PG1REG PG01CR PG01CR2
[10] High speed serial channels
address
register name
address
register name
address
register name
address
register name
0C00H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
HSC0MD HSC0MD HSC0CT HSC0CT HSC0ST HSC0ST HSC0CR HSC0CR HSC0IS HSC0IS HSC0WE HSC0WE HSC0IE HSC0IE HSC0IR HSC0IR
0C10H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
HSC0TD HSC0TD HSC0RD HSC0RD HSC0TS HSC0TS HSC0RS HSC0RS
0C20H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
HSC1MD HSC1MD HSC1CT HSC1CT HSC1ST HSC1ST HSC1CR HSC1CR HSC1IS HSC1IS HSC1WE HSC1WE HSC1IE HSC1IE HSC1IR HSC1IR
0C30H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
HSC1TD HSC1TD HSC1RD HSC1RD HSC1TS HSC1TS HSC1RS HSC1RS
92CM27 - 395
2005-04-20
TMP92CM27
[11] UART/Serial channels
address
[12] I2CBUS/Serial channels
address
register name
register name
address
register name
1200H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
SC0BUF SC0CR SC0MOD0 BR0CR BR0ADD SC0MOD1 SIR0CR SC1BUF SC1CR SC1MOD0 BR1CR BR1ADD SC1MOD1
1210H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
SC2BUF SC2CR SC2MOD0 BR2CR BR2ADD SC2MOD1
SC3BUF SC3CR SC3MOD0 BR3CR BR3ADD SC3MOD1
1240H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
SBI0CR1 SBI0DBR I2C0AR
SBI0CR2/SBI0SR
SBI0BR0 SBI0BR1
SBI1CR1 SBI1DBR I2C1AR
SBI1CR2/SBI1SR
SBI1BR0 SBI1BR1
[13] AD converter
address
[14] DA converter
address
register name
register name
address
register name
12A0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
ADREG0L ADREG0H ADREG1L ADREG1H ADREG2L ADREG2H ADREG3L ADREG3H ADREG4L ADREG4H ADREG5L ADREG5H ADREG6L ADREG6H ADREG7L ADREG7H
12B0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
ADREG8L ADREG8H ADREG9L ADREG9H ADREGAL ADREGAH ADREGBL ADREGBH ADMOD0 ADMOD1 ADMOD2
12E0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
DAC0REG DAC0CNT1 DAC0CNT0 DAC1REG DAC1CNT1 DAC1CNT0
92CM27 - 396
2005-04-20
TMP92CM27
[15] Watch Dog Timer
address
[16] Key-on wake up
address
register name
register name
1300H WDMOD 1H WDCR 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
0090H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH KIEN FH KICR
92CM27 - 397
2005-04-20
TMP92CM27
(1) I/O port (1/6)
Symbol P1 Name
Port 1
Address
7 P17
6 P16
5 P15
4 P14
3 P13
2 P12
1 P11
0 P10
0004H
P6
Port 6
0018H
P7
Port 7
001CH
P8
Port 8
0020H
P9
Port 9
0024H
PA
Port A
0028H
PC
Port C
0030H
PD
Port D
0034H
PF
Port F
003CH
PJ
Port J
004CH
PK
Port K
0050H
PL
Port L
0054H
PM
Port M
0058H
PN
Port N
005CH
R/W Data from external port (Output latch register is cleared to "0") P67 P66 P65 P64 P63 P62 P61 P60 R/W Data from external port (Output latch register is cleared to "0") P77 P76 P75 P74 P73 P72 P71 R/W Data from external port (Output latch register is set to "1") Pull-up register Pull-up register 0:OFF 1:ON 0:OFF 1:ON P87 P86 P85 P84 P83 P82 P81 P80 R/W Data from external 1 1 1 0 1 1 port (Output latch register is set to "1") P96 P95 P94 P93 P92 P91 P90 R/W 1 1 1 1 1 1 1 PA5 PA4 PA3 PA2 PA1 PA0 R/W Data from external port (Output latch register is set to "1") PC5 PC4 PC3 PC2 PC1 PC0 R/W Data from external port (Output latch register is set to "1") PD5 PD4 PD3 PD2 PD1 PD0 R/W Data from external port (Output latch register is set to "1") PF6 PF5 PF4 PF3 PF2 PF1 PF0 R/W Data from external port (Output latch register is set to "1") PJ7 PJ6 PJ5 PJ4 PJ3 PJ2 PJ1 PJ0 R/W Data from external port (Output latch register is set to "1") PK7 PK6 PK5 PK4 PK3 PK2 PK1 PK0 R/W Data from external port PL7 PL6 PL5 PL4 PL3 PL2 PL1 PL0 R/W Data from external port (Output latch register is set to "1") PM7 PM6 PM5 PM4 PM3 PM2 PM1 PM0 R Input disable PN3 PN2 PN1 PN0 R Input disable
92CM27 - 398
2005-04-20
TMP92CM27
I/O port (2/6)
Symbol P1CR Name
Port 1 control register
Address
0006H
(Prohibit RMW)
7 P17C 0
6 P16C 0
5 P15C 0
4 P14C W 0 0:Input
3 P13C 0 1:Output
2 P12C 0
1 P11C 0
0 P10C 0 P1F W 0
0:Port 1:Data bus (D8 to D15)
P1FC
Port 1 function register
0007H
(Prohibit RMW)
P6CR
Port 6 control regiser Port 6 function register
001AH
(Prohibit RMW)
P67C 0 P67F 1 P77C 0 P77F 0 0:Port 1: WAIT P87C W 0 0:Input P87F 0 0:Port 1: BUSAK
P66C 0 P66F 1 P76C 0 P76F 0 0:Port 1: SRLUB P86C 0 1:Ouput P86F 0 0:Port 1: BUSRQ
P65C 0
P64C W 0 0:Input P64F
P63C
P62C
P61C 0 P61F 1 P71C 0 P71F 0 0:Port 1: WRLL
P60C 0 P60F 1
001BH
(Prohibit RMW)
P6FC
P7CR
Port 7 control register
001EH
(Prohibit RMW)
P7FC
Port 7 function register
001FH
(Prohibit RMW)
0 0 1:Output P65F P63F P62F W 1 1 1 1 0:Port 1:Address bus (A16 to A23) P75C P74C P73C P72C W 0 0 0 0 0:Input 1:Output P75F P74F P73F P72F W 0 0 0 0 0:Port 0:Port 0:Port 0:Port 1: SRLLB 1: SRWR 1:R/ W 1: WRLU
P8CR
Port 8 control register
0021H
(Prohibit RMW)
P85F 0 0:Port 1: P85F2 W 0 0: CS5 1: WDOUT
P84F
W
P83F 0 0:Port 1: P83F2 W 0 0: CS3 1: SDCS
P82F 0 0:Port 1: CS2
P81F 0 0:Port 1: CS1
P80F 0 0:Port 1: CS0
P8FC
Port 8 control register
0022H
(Prohibit RMW)
0 0:Port 1: CS4
P8FC2
Port 8 function register 2
0023H
(Prohibit RMW)
P9DR
Port 9 drive register
0025H
(Prohibit RMW)
P9FC
Port 9 function register
0027H
(Prohibit RMW)
P93D P92D P91D P90D R/W 1 1 1 1 1 1 1 0:The inside of HALT is figh impedance 1:The inside of HALT is also driven P96F P95F P94F P93F P92F P91F P90F W 0 0 0 0 0 0 0 0:Port 0:Port 0:Port 0:Port 0:Port 0:Port 0:Port 1: SDRAS 1: SDWE 1:SDCLK 1:SDCKE 1:SDLUDQM 1:SDLLDQM 1: SDCAS
P96D
P95D
P94D
92CM27 - 399
2005-04-20
TMP92CM27 I/O Port (3/6)
0029H
(Prohibit RMW)
PAFC2
Port A function register 2
PA4F2 W 0

PA1F2 W 0

PACR
Port A control register
002AH
(Prohibit RMW)
PA5C 0 PA5F 0
PA4C 0 PA4F W 0
PA5
Input port Output port SCLK1/
PA3C W
PA2C
PA1C 0 PA1F 0
PA2 PA1
Input port Output port Reserved
PA0C 0 PA0F 0
PA0
Input port Output port RXD0 input
0 0 PA3F PA2F 0
PA4
Input port Output port Reserved
0
PA3
Input port Output port RXD1 input

000 001 010
Input port Output port SCLK0/
PAFC
Port A function register
002BH
(Prohibit RMW)
011
CTS1
input SCLK1 output TXD1 output (Open Drain Disable)
CTS0
input
Reserved
SCLK0 output
TXD0 output (Open Drain Disable) Reserved Reserved Reserved TXD0 output (Open Drain Enable)
Reserved
100 101 110 111
Reserved Reserved Reserved TXD1 output (Open Drain Enable)
PCFC2
Port C function register 2 Port C control register
0031H
(Prohibit RMW)
PC4F2 W 0 PC5C 0 PC5F 0 PC4C 0 PC4F 0
PC5
Input port Output port SCK1 input
PC3F2 0 PC3C W 0 PC3F W 0
PC4
Input port Output port SI1 input
PC1F2 W 0 PC2C 0 PC2F 0
PC3
Input port Output port SO1 output (Open Drain Disable)
PC0F2 0 PC0C 0 PC0F 0
PC0
Input port Output port SO0 output (Open Drain Disable)


0032H
(Prohibit RMW)
PC1C 0 PC1F 0
PC2 PC1
Input port Output port SI0 input
PCCR


000 001 010
Input port Output port SCK0 input
PCFC
Port C function register
0033H
(Prohibit RMW)
011
SCK1 output SCL1 I/O
SDA1 I/O
SCK0 output SCL0 I/O
SDA0 I/O
(Open Drain (Open Drain Disable) Disable) Reserved Reserved SO1 output (Open Drain Enable)
(Open Drain (Open Drain Disable) Reserved Reserved Reserved Disable) Reserved Reserved SO0 output (Open Drain Enable) SCL0 I/O SDA0 I/O
100 101 110
Reserved Reserved Reserved
111
SCL1 I/O
SDA1 I/O
(Open Drain (Open Drain Enable) Enable)
(Open Drain (Open Drain Enable) Enable)
92CM27 - 400
2005-04-20
TMP92CM27
I/O Port (4/6)
Symbol Name
Port D function register 2
Address
7
6
5
0035H
(Prohibit RMW)
PDFC2
4 PD4F2 W 0

3
2
1
0
PDCR
Port D control register
0036H
(Prohibit RMW)
PD5C 0 PD5F 0
PD4C 0 PD4F 0
PD5
Input port Output port SCLK2/
PD3C W 0 PD3F W 0
PD4
Input port Output port Reserved
PD2C 0 PD2F 0
PD3
Input port Output port RXD2 input
PD1C 0 PD1F 0
PD2 PD1
Input port Output port Reserved
PD0C 0 PD0F 0
PD0
Input port Output port HSSI0 input


000 001 010
Input port Output port Reserved
PDFC
Port D function register
0037H
(Prohibit RMW)
CTS2
input
011
SCLK2 output
TXD2 output (Open Drain Disable)
Reserved
HSCLK0 output
HSSO0 output
Reserved
100 101 110 111
Reserved Reserved Reserved TXD2 output (Open Drain
PFFC2
Port F function register 2
003DH
(Prohibit RMW)
PF6F2 W 0

PF4F2 W 0

PF2F2 W 0

PF0F2 W 0

PFCR
Port F control register
003EH
(Prohibit RMW)
PF6C 0 PF6F 0
PF5C 0 PF5F 0
PF6
Input port Output port TA6IN input Reserved
PF4C 0 PF4F 0
PF5
Input port Output port Reserved TA5OUT output
PF3C W 0

PF2C 0 PF2F 0
PF3 PF2
Input port Output port Reserved Reserved
PF1C 0 PF1F 0
PF1
Input port Output port Reserved TA1OUT output
PF0C 0 PF0F 0
PF0
Input port Output port HSSI0 input Reserved
PF3F W 0
PF4
Input port

PFFC
Port F function register
003FH
(Prohibit RMW)
000 001 010 011 100 101 110 111
Input port
Output port Output port Reserved Reserved RXD2 input TA3OUT output Reserved Reserved INT2 input Reserved
Reserved Reserved INT3 input Reserved
Reserved Reserved INT1 input Reserved
Reserved Reserved INT0 input Reserved
92CM27 - 401
2005-04-20
TMP92CM27
I/O Port (5/6)
PJFC2
Port J function register 2
004DH
(Prohibit RMW)
PJ7F 0 PJ7C 0 PJ7F 0
PJ6F w
PJ5F
PJ4F
0
0 0
PJCR
Port J control register
004EH
(Prohibit RMW)
PJ6C 0 PJ6F
0
PJ5C 0 PJ5F
0
PJ7
Input port Output port Reserved TB3OUT1 output
PJ4C W 0 PJ4F
W 0
PJ3C 0 PJ3F
0
PJ4
Input port
PJ2C 0 PJ2F
0
PJ3 PJ2
Input port Output port Reserved TB1OUT0 output
PJ1C 0 PJ1F
0
PJ1
Input port Output port Reserved TB0OUT1 output
PJ0C 0 PJ0F
0
PJ0


PJ6
Input port Output port Reserved TB3OUT0 output Reserved Reserved Reserved TB5OUT0 output
PJ5
Input port Output port Reserved TB2OUT1 output Reserved Reserved Reserved TB4OUT1 output
PJFC
Port J function register
004FH
(Prohibit RMW)
000 001 010 011 100 101 110 111
Input port
Input port Output port Reserved TB0OUT0 output
Output port Output port Reserved TB2OUT0 output Reserved Reserved Reserved TB4OUT0 output Reserved TB1OUT1 output
Reserved Reserved Reserved TB5OUT1 output
PKFC2
Port K function register 2
0051H
(Prohibit RMW)
PK7F2 0 PK7F 0
PK6F2
0
PK5F2
0
PK4F2
W
PK3F2
PK2F2
0
PK1F2
0
PK0F2
0
0 0
PK6F
0
PK5F
0
PK7
Input port
PK4F
W 0
PK3F
0
PK4
Input port
PK2F
0
PK3 PK2
Input port
PK1F
0
PK1
Input port
PK0F
0
PK0
PKFC
Port K function register
0053H

(Prohibit RMW)
PK6
Input port
PK5
Input port
00 01 10 11
Input port
Input port
TB3IN1 input TB3IN0 input TB2IN1 input TB2IN0 input TB1IN1 input TB1IN0 input TB0IN1 input TB0IN0 input Reserved INTB input Reserved INTA input Reserved INT9 input Reserved INT8 input Reserved INT7 input Reserved INT6 input Reserved INT5 input Reserved INT4 input
92CM27 - 402
2005-04-20
TMP92CM27
I/O (6/6)
Symbol PLFC2
Name
Address
7
6 PL6F2 0
5 PL5F2 0 PL5C 0 PL5F 0
PL7
Input port Output port Reserved
4 PL4F2 0 PL4C W 0 PL4F W 0
PL6 PL5
Input port Output port Reserved
3 PL3F2 W 0

2 PL2F2 0 PL2C 0 PL2F 0
PL3
Input port
1 PL1F2 0 PL1C 0 PL1F 0
PL1
Input port Output port Reserved
0 PL0F2 0 PL0C 0 PL0F 0
PL0
Input port Output port Reserved
Port L function register 2 Port L function register
0055H
(Prohibit RMW)
0056H
(Prohibit RMW)
PL7C 0 PL7F 0
PL6C 0 PL6F 0
PL3C 0 PL3F 0
PL4
Input port
PLCR


PL2
Input port Output port Reserved
000 001 010
Input port Output port Reserved
Output port Output port Reserved Reserved
PLFC
Port L function register
0057H
(Prohibit RMW)
011 100
PG13 output PG12 output PG11 output PG10 output PG03 output PG02 output PG01 output PG00 output Reserved Reserved HSSI1 input Reserved SCLK3/ Reserved RXD3 input
CTS3
input
101
HSCLK1 output
HSSO1 output
Reserved
Reserved
SCLK3 output
TXD3 output (Open Drain Disable)
Reserved
110 111
Reserved Reserved
Reserved Reserved
Reserved Reserved
Reserved TA7OUT output
Reserved Reserved
Reserved
Reserved
TXD3 output Reserved (Open Drain Enable)
PMFC
Port M function register Port N function register
005BH
(Prohibit RMW)
PM7F 1
PM6F 1
PM5F
PM4F W
PM3F
PM2F
PM1F 1 PN1F W
PM0F 1 PN0F 1
005FH
(Prohibit RMW)
1 1 1 1 0:Input port / Key input 1:Analog input PN3F PN2F 1
PNFC
1 1 0:Input port 1:Analog input
92CM27 - 403
2005-04-20
TMP92CM27
(2) Interrupt control (1/5)
Symbol Name
Address
7
I1C R 0 1:INT1 I3C R 0 1:INT3 I5C R 0 1:INT5 I7C R 0 1:INT7 ITA1C R 0 1:INTTA1
6
INT1 I1M2 0
5
4
3
I0C R 0 1:INT0 I2C R 0 1:INT2 I4C R 0 1:INT4 I6C R 0 1:INT6 ITA0C R 0 1:INTTA0 ITA2C R 0 1:INTTA2 ITA4C R 0 1:INTTA4 ITA6C R 0 1:INTTA6
2
INT0 I0M2
1
0
INTE01
INT0 & INT1 Enable
00D0H
I1M1 I1M0 R/W 0 0 Interrupt request level INT3 I3M1 R/W 0 Interrupt request level INT5 I3M0 0
I0M1 I0M0 R/W 0 0 0 Interrupt request level INT2 I2M1 R/W I2M0
I3M2 0
I2M2 0
INTE23
INT2 & INT3 Enable
00D1H
0 0 Interrupt request level INT4
INTE45
INT4 & INT5 Enable
00D2H
INTE67
INT6 & INT7 Enable
00D3H
INTETA01
INTTA0 & INTTA1 Enable
00D4H
I5M1 I5M0 R/W 0 0 0 Interrupt request level INT7 I7M2 I7M1 I7M0 R/W 0 0 0 Interrupt request level INTTA1 (TMRA1) ITA1M2 ITA1M1 ITA1M0 R/W 0 0 0 Interrupt request level INTTA3 (TMRA3) ITA3M2 ITA3M1 ITA3M0 R/W 0 0 0 Interrupt request level INT8/INTTA5 (TMRA5) ITA5M2 ITA5M1 ITA5M0 R/W 0 0 0 Interrupt request level INT9/INTTA7 (TMRA7) ITA7M2 ITA7M1 R/W 0 0 ITA7M0 0
I5M2
I4M1 I4M0 R/W 0 0 0 Interrupt request level INT6 I6M2 I6M1 I6M0 R/W 0 0 0 Interrupt request level INTTA0 (TMRA0) ITA0M2 ITA0M1 ITA0M0 R/W 0 0 0 Interrupt request level INTTA2 (TMRA2) ITA2M2 ITA2M1 ITA2M0 R/W 0 0 0 Interrupt request level INTTA4 (TMRA4) ITA4M2 ITA4M1 ITA4M0 R/W 0 0 0 Interrupt request level INTTA6 (TMRA6) ITA6M2 ITA6M1 R/W 0 0 ITA6M0 0
I4M2
INTETA23
INTTA2 & INTTA3 Enable
00D5H
ITA3C R 0 1:INTTA3 ITA5C R 0 1:INT8/ INTTA5 ITA7C R 0 1:INT9/ INTTA7
INTE8TA45
INTTA4 & INT8/INTTA5 Enable
00D6H
INTE9TA67
INTTA6 & INT9/INTTA7 Enable
00D7H
Interrupt request level
Interrupt request level
92CM27 - 404
2005-04-20
TMP92CM27
Interrupt control (2/5)
INTTX0 INTRX0 ITX0M0 0 IRX0C R 0 1:INTRX0 IRX1C R 0 1:INTRX1 IRX2C R 0 1:INTRX2 IRX3C R 0 1:INTRX3 ISBE0C R 0 1:INTSBE0 ISBE1C R 0 1:INTSBE1 IAC R 0
1:INTA
INTRX0 & INTTX0 Enable
INTES0
00D8H
ITX0C R 0 1:INTTX0
ITX0M2 0
ITX0M1 R/W 0
IRX0M2 0
IRX0M1 R/W 0
IRX0M0 0
Interrupt request level INTTX1 ITX1M2 ITX1M1 ITX1M0 R/W 0 0 0 Interrupt request level INTTX2 ITX2M2 0 ITX2M1 ITX2M0 R/W 0 0 Interrupt request level INTTX3
Interrupt request level INTRX1 IRX1M2 IRX1M1 IRX1M0 R/W 0 0 0 Interrupt request level INTRX2 IRX2M2 0 IRX2M1 R/W 0 IRX2M0 0
INTES1
INTRX1 & INTTX1 Enable
00D9H
ITX1C R 0 1:INTTX1 ITX2C R 0 1:INTTX2
INTES2
INTRX2 & INTTX2 Enable
00DAH
Interrupt request level INTRX3 IRX3M2 0 IRX3M1 R/W 0 IRX3M0 0
INTES3
INTRX3 & INTTX3 Enable
00DBH
ITX3C R 0 1:INTTX3
ITX3M2 0
ITX3M1 ITX3M0 R/W 0 0 Interrupt request level -
Interrupt request level INTSBE0 ISBE0M2 ISBE0M1 ISBE0M0 R/W 0 0 0 Interrupt request level INTSBE1 ISBE1M2 ISBE1M1 ISBE1M0 R/W 0 0 0 Interrupt request level INTA
IAM2 IAM1 IAM0
INTESB0
INTSBE0 Enable
-
-
-
-
00DCH Always write "0"
-
INTESB1
INTSBE1 Enable
00DDH
Always write "0"
INTHSC0
INTEAHSC0 INTA & INTHSC0 Enable
00DEH
IHSC0C R 0
1:INTHSC0
IHSTX0M2
IHSTX0M1
IHSTX0M0
0
R/W 0 Interrupt request level INTHSC1
IHSTX1M1
0
R/W 0 0 0 Interrupt request level INTB
IBM2 IBM1 IBM0
INTEBHSC1
INTB & INTHSC1 Enable
00DFH
IHSC1C R 0
1:INTHSC1
IHSTX1M2
IHSTX1M0
0
R/W 0 Interrupt request level
0
IBC R 0
1:INTB
R/W 0 0 0 Interrupt request level
92CM27 - 405
2005-04-20
TMP92CM27
Interrupt control (3/5)
Symbol Name
INTTB00 & INTTB01 Enable
Address
7
ITB01C R 0
1:INTTB01
6
5
4
3
ITB00C R 0
1:INTETB00
2
1
0
INTETB0
00E0H
INTETB1
INTTB10 & INTTB11 Enable
ITB11C 00E2H
INTTB01 (TMRB0) ITB01M2 ITB01M1 ITB01M0 R/W 0 0 0 Interrupt request level INTTB11 (TMRB1) ITB11M2 ITB11M1 ITB11M0
ITB10C
INTTB00 (TMRB0) ITB00M2 ITB00M1 ITB00M0 R/W 0 0 0 Interrupt request level INTTB10 (TMRB1) ITB10M2 ITB10M1 ITB10M0
R 0
1:INTTB11
0
R/W 0
0
R 0
1:INTTB10
0
R/W 0
0
INTETB2
INTTB20 & INTTB21 Enable
ITB21C 00E5H
Interrupt request level INTTB21 (TMRB2) ITB21M2 ITB21M1 ITB21M0
ITB20C
Interrupt request level INTTB20 (TMRB2) ITB20M2 ITB20M1 ITB20M0
R 0
1:INTTB21
0
R/W 0
Interrupt request level
0
R 0
1:INTTB20
0
R/W 0
0
INTETB3
INTTB30 & INTTB31 Enable
Interrupt request level INTTB31/INTTB30 (TMRB3) ITB3XC ITB3XM2 ITB3XM1 ITB3XM0
00E6H
R 0 Always write "0"
1:INTTB31/30
0
R/W 0
0
INTETB4
INTTB40 & INTTB41 Enable
Interrupt request level INTTB41/INTTB40 (TMRB4) ITB4XC ITB4XM2 ITB4XM1 ITB4XM0
00E7H
R 0 Always write "0"
1:INTTB41/40
0
R/W 0
0
INTETB5
INTTB50 & INTTB51 Enable
Interrupt request level INTTB51/INTTB50 (TMRB5) ITB5XC ITB5XM2 ITB5XM1 ITB5XM0
00E8H
R 0 Always write "0"
1:INTTB51/50
0
R/W 0
Interrupt request level
0
INTTBOX
INTETBOX
INTTBOX (Overflow) Enable
00E9H Always write "0"
ITBOXC R 0
1:INTTBOX
ITBOXM2
ITBOXM1 ITBOXM0 R/W 0 0 0 Interrupt request level
92CM27 - 406
2005-04-20
TMP92CM27
Interrupt control (4/5)
INTP0
INTP0 & INTAD Enable
INTEPAD
00E4H
IP0C R 0 1:INTP0 INCNM R 0 1:NMI ITC1C R 0 1:INTTC1 ITC3C R 0 1:INTTC3 ITC5C R 0 1:INTTC5 ITC7C R 0 1:INTTC7
IP0M2 0
INTNMWDT
NMI & INTWDT Enable
-
IP0M1 IP0M0 R/W 0 0 Interrupt request level NMI -
IADC R 0 1:INTAD INCWD R 0 1:INTWDT ITC0C R 0 1:INTTC0 ITC2C R 0 1:INTTC2 ITC4C R 0 1:INTTC4 ITC6C R 0 1:INTTC6
INTAD IADM2 IADM1 IADM0 R/W 0 0 0 Interrupt request level INTWDT -
00EFH
INTTC1 (DMA1)
INTTC0 (DMA0) ITC0M2 ITC0M1 ITC0M0 R/W 0 0 0 Interrupt request level INTTC2 (DMA2)
INTETC01
INTTC0 & INTTC1 Enable
ITC1M2
00F0H
ITC1M1 ITC1M0 R/W 0 0 0 Interrupt request level INTTC3 (DMA3)
INTETC23
INTTC2 & INTTC3 Enable
ITC3M2
00F1H
INTETC45
INTTC4 & INTTC5 Enable
00F2H
ITC3M1 ITC3M0 R/W 0 0 0 Interrupt request level INTTC5 (DMA5) ITC5M2 ITC5M1 ITC5M0 R/W 0 0 0 Interrupt request level INTTC7 (DMA7) ITC7M2 0 ITC7M1 ITC7M0 R/W 0 0 Interrupt request level
ITC2M2
ITC2M1 ITC2M0 R/W 0 0 0 Interrupt request level INTTC4 (DMA4) ITC4M2 ITC4M1 ITC4M0 R/W 0 0 0 Interrupt request level INTTC6 (DMA6) ITC6M2 ITC6M1 ITC6M0 R/W 0 0 0 Interrupt request level
INTETC67
INTTC6 & INTTC7 Enable
00F3H
92CM27 - 407
2005-04-20
TMP92CM27
Interrupt control (5/5)
Symbol Name
Address
7
W 0
6
5
4
3
IR3LE 1
INTRX3 0: edge mode 1: level mode
2
IR2LE R/W 1
INTRX2 0: edge mode 1: level mode
1
IR1LE 1
INTRX1 0: edge mode 1: level mode
0
IR0LE 1
INTRX0 0: edge mode 1: level mode
SIMC
SIO Interrupt Mode control
00F5
(Prohibit RMW)
Always write "1"
NMIREE
IIMC0
Interrupt Input mode control 0
00F6H
(Prohibit RMW)
R/W 0
NMI
I7LE
I6LE 0 INT6 0:Edge 1:Level I6EDGE 0 INT6 0: Rising /High 1: Falling /Low
I5LE 0 INT5 0:Edge 1:Level I5EDGE 0 INT5 0: Rising /High 1: Falling /Low
I4LE R/W 0 INT4 0:Edge 1:Level I4EDGE
I3LE
I2LE 0 INT2 0:Edge 1:Level I2EDGE 0 INT2 0: Rising /High 1: Falling /Low IALE R/W 0 INTA 0:Edge 1:Level IAEDGE
I1LE 0 INT1 0:Edge 1:Level I1EDGE 0 INT1 0: Rising /High 1: Falling /Low I9LE
0:Falling 1:Falling and Rising I0LE 0 INT0 0:Edge 1:Level I0EDGE 0 INT0 0: Rising /High 1: Falling /Low I8LE 0 INT8 0:Edge 1:Level I8EDGE 0 INT8 0: Rising /High 1: Falling /Low 0 DP24SEL 0
0:INTTA5 Interruption is effective 1:INT8 Interruption is effective
IIMC1
Interrupt Input mode control 1
00FAH
(Prohibit RMW)
0 INT7 0:Edge 1:Level I7EDGE 0 INT7 0: Rising /High 1: Falling /Low
IIMC2
Interrupt Input mode control 2
00FBH
(Prohibit RMW)
0 INT3 0:Edge 1:Level I3EDGE R/W 0 0 INT4 INT3 0: Rising 0: Rising /High /High 1: Falling 1: Falling /Low /Low IBLE
IIMC3
Interrupt Input mode control 3
010EH
(Prohibit RMW)
0 INTB 0:Edge 1:Level IBEDGE
IIMC4
Interrupt Input mode control 4
010FH
(Prohibit RMW)
INTCLR
Interrupt Clear Control
00F8H
(Prohibit RMW)
0 -
INTSEL
Interruption combination selection
010CH
(Prohibit RMW)
0 INTB 0: Rising /High 1: Falling /Low W 0 0 0 0 0 0 Clear the interrupt request flag by the writing of a micro DMA starting vector DP49SEL DP48SEL DP47SEL DP39SEL DP37SEL DP26SEL R/W 0 0 0 0 0 0
0:INTTB50 Interruption is effective 1:INTTB51 Interruption is effective 0:INTTB40 Interruption is effective 1:INTB41 Interruption is effective 0:INTTB30 Interruption is effective 1:INTTB31 Interruption is effective 0:INTB Interruption is invalid 1:INTB Interruption is effective 0:INTA Interruption is invalid 1:INTA Interruption is effective 0:INTTA7 Interruption is effective 1:INT9 Interruption is effective
0 INT9 0:Edge 1:Level I9EDGE R/W 0 0 INTA INT9 0: Rising 0: Rising /High /High 1: Falling 1: Falling /Low /Low -
TBOF5ST 0
TBOF4ST 0
Read: 0:Interruption un-generating 1:Interruption generating Write: 0:"0" clear 1:Don't care
TBOF3ST TBOF2ST R/W 0 0
Read: 0:Interruption un-generating 1:Interruption generating Write: 0:"0" clear 1:Don't care Read: 0:Interruption un-generating 1:Interruption generating Write: 0:"0" clear 1:Don't care
TBOF1ST 0
Read: 0:Interruption un-generating 1:Interruption generating Write: 0:"0" clear 1:Don't care
TBOF0ST 0
Read: 0:Interruption un-generating 1:Interruption generating Write: 0:"0" clear 1:Don't care
INTST
Interruption generating flag
010DH
(Prohibit RMW)
Read: 0:Interruption un-generating 1:Interruption generating Write: 0:"0" clear 1:Don't care
92CM27 - 408
2005-04-20
TMP92CM27
(3) DMA controller
Symbol DMA0V Name
DMA0 Start Vector
Address
7
6
5 DMA0V5 0 DMA1V5
4 DMA0V4 0 DMA1V4 0 DMA2V4 0 DMA3V4 0 DMA4V4 0 DMA5V4 0 DMA6V4 0 DMA7V4 0 DBST4
0100H
3 2 DMA0V3 DMA0V2 R/W 0 0 DMA0 Start Vector DMA1V3 DMA1V2 R/W 0 0 DMA1 Start Vector DMA2V3 DMA2V2 R/W 0 0 DMA2 Start Vector DMA3V3 DMA3V2 R/W 0 0 DMA3 Start Vector DMA4V3 DMA4V2 R/W 0 0 DMA4 Start Vector DMA5V3 DMA5V2 R/W 0 0 DMA5 Start Vector DMA6V3 DMA6V2 R/W 0 0 DMA6 Start Vector DMA7V3 DMA7V2 R/W 0 0 DMA7 Start Vector DBST3 DBST2
1 DMA0V1 0 DMA1V1 0 DMA2V1 0 DMA3V1 0 DMA4V1 0 DMA5V1 0 DMA6V1 0 DMA7V1 0 DBST1 0 DREQ1 0
0 DMA0V0 0 DMA1V0 0 DMA2V0 0 DMA3V0 0 DMA4V0 0 DMA5V0 0 DMA6V0 0 DMA7V0 0 DBST0 0 DREQ0 0
DMA1V
DMA1 Start Vector
0101H
0 DMA2V5
DMA2V
DMA2 Start Vector
0102H
0 DMA3V5
DMA3V
DMA3 Start Vector
0103H
0 DMA4V5
DMA4V
DMA4 Start Vector
0104H
0 DMA5V5
DMA5V
DMA5 Start Vector
0105H
0 DMA6V5
DMA6V
DMA6 Start Vector
0106H
0 DMA7V5
DMA7V
DMA7 Start Vector
0107H
0 DBST7 DBST6 0 DREQ6 0 DBST5 0
DMAB
DMA Burst
0108H
R/W 0 DREQ7 0 0 0 0 1: DMA request on Burst Mode DREQ5 DREQ4 DREQ3 DREQ2 R/W 0 0 0 0 1:DMA request in software
DMAR
DMA Request
0109H
(Prohibit RMW)
92CM27 - 409
2005-04-20
TMP92CM27
(4) Memory controller (1/3)
Symbol Name
Address
7
6
B0WW2
5
B0WW1 W 1
4
B0WW0 0
3
2
B0WR2 0 Read waits 001:0WAIT 101:2WAIT
1
B0WR1 W 1
0
B0WR0 0
B0CSL
BLOCK 0 MEMC control register Low
0140H
(Prohibit RMW)
0 Write waits 001:0WAIT 101:2WAIT
010:1WAIT 110:3WAIT
010:1WAIT 110:3WAIT
B0CSH
BLOCK 0 MEMCT control register High
0141H
(Prohibit RMW)
B0E W 0 CS select 0:Disable 1:Enable
111:4WAIT 011: WAIT pin Others:Reserved B0REC 0
B0OM1 0
111:4WAIT 011: WAIT pin Others:Reserved B0OM0 B0BUS1 B0BUS0 W 0 0 0 Data Bus width 00:8bit 01:16bit 10:Reserved 11:Reserved B1WR1 B1WR0 W 1 0 010:1WAIT 110:3WAIT
Always write "0"
Always write "0"
0:Not insert a
dummy cycle
1:Insert a dummy
cycle
00:ROM/SRAM 01:Reserved 10:Reserved 11:Reserved B1WR2 0 Read waits 001:0WAIT 101:2WAIT
B1WW2
BLOCK 1 MEMC control register Low
0144H
(Prohibit RMW)
B1CSL
0 Write waits 001:0WAIT 101:2WAIT
B1WW1 W 1
B1WW0 0
010:1WAIT 110:3WAIT
B1CSH
BLOCK 1 MEMC control register High
0145H
(Prohibit RMW)
B1E W 0 CS select 0:Disable 1:Enable
111:4WAIT 011: WAIT pin Others:Reserved B1REC 0
B1OM1 0
111:4WAIT 011: WAIT pin Others:Reserved B1OM0 B1BUS1 B1BUS0 W 0 0 0 Data Bus width 00:8bit 01:16bit 10:Reserved 11:Reserved B2WR1 B2WR0 W 1 0 010:1WAIT 110:3WAIT
Always write "0"
Always write "0"
0: Not insert a
dummy cycle
1: Insert a dummy
cycle
00:ROM/SRAM 01:Reserved 10:Reserved 11:Reserved B2WR2 0 Read waits 001:0WAIT 101:2WAIT
B2WW2
BLOCK 2 MEMC control register Low
0148H
(Prohibit RMW)
B2CSL
0 Write waits 001:0WAIT 101:2WAIT
B2WW1 W 1
B2WW0 0
010:1WAIT 110:3WAIT
B2E W
BLOCK 2 MEMC control register High
111:4WAIT 011: WAIT pin Others:Reserved B2M B2REC 0 0:16MB 1:Sets area 0
B2OM1 0
0149H
(Prohibit RMW)
1 CS select 0:Disable 1:Enable
111:4WAIT 011: WAIT pin Others:Reserved B2OM0 B2BUS1 B2BUS0 W 0 0/1 0/1 Data Bus width 00:8bit 01:16bit 10:Reserved 11:Reserved B3WR1 B3WR0 W 1 0 010:1WAIT 110:3WAIT
B2CSH
Always write "0"
0: Not insert a
dummy cycle
1: Insert a dummy
cycle
00:ROM/SRAM 01:Reserved 10:Reserved 11:Reserved B3WR2 0 Read waits 001:0WAIT 101:2WAIT
B3WW2
BLOCK 3 MEMC control register Low
014CH
(Prohibit RMW)
B3CSL
0 Write waits 001:0WAIT 101:2WAIT
B3WW1 W 1
B3WW0 0
010:1WAIT 110:3WAIT
B3CSH
BLOCK 3 MEMC control register High
014DH
(Prohibit RMW)
B3E W 0 CS select 0:Disable 1:Enable
111:4WAIT 011: WAIT pin Others:Reserved B3REC 0
B3OM1 0
111:4WAIT 011: WAIT pin Others:Reserved B3OM0 B3BUS1 B3BUS0 W 0 0 0 Data Bus width 00:8bit 01:16bit 10:Reserved 11:Reserved
Always write "0"
Always write "0"
0: Not insert a
dummy cycle
1: Insert a
dummy cycle
00:ROM/SRAM 01:Reserved 10:Reserved 11:SDRAM
Note1:
A value is set to B2CSH according to the state of AM[1:0] terminal at the time of reset release.
92CM27 - 410
2005-04-20
TMP92CM27
Memory controller (2/3)
Symbol Name
Address
7
6
B4WW2 0 Write waits 001:0WAIT 101:2WAIT
5
B4WW1 W 1
4
B4WW0 0
3
2
B4WR2 0 Read waits 001:0WAIT 101:2WAIT
1
B4WR1 W 1
0
B4WR0 0
B4CSL
BLOCK 4 MEMC control register Low
0150H
(Prohibit RMW)
010:1WAIT 110:3WAIT
010:1WAIT 110:3WAIT
B4CSH
BLOCK 4 MEMC control register High
0151H
(Prohibit RMW)
B4E W 0 CS select 0:Disable 1:Enable
111:4WAIT 011: WAIT pin Others:Reserved B4REC 0
B4OM1 0
111:4WAIT 011: WAIT pin Others:Reserved B4OM0 B4BUS1 B4BUS0 W 0 0 0 Data Bus width 00:8bit 01:16bit 10:Reserved 11:Reserved B5WR1 B5WR0 W 1 0 010:1WAIT 110:3WAIT
Always write "0"
Always write "0"
0: Not insert a
dummy cycle
1: Insert a
dummy cycle
00:ROM/SRAM 01:Reserved 10:Reserved 11:Reserved B5WR2 0 Read waits 001:0WAIT 101:2WAIT
B5WW2
BLOCK 4 MEMC control register Low
0154H
(Prohibit RMW)
B5CSL
0 Write waits 001:0WAIT 101:2WAIT
B5WW1 W 1
B5WW0 0
010:1WAIT 110:3WAIT
B5CSH
BLOCK 4 MEMC control register High
0155H
(Prohibit RMW)
B5E W 0 CS select 0:Disable 1:Enable
111:4WAIT 011: WAIT pin Others:Reserved B5REC 0
B5OM1 0
111:4WAIT 011: WAIT pin Others:Reserved B5OM0 B5BUS1 B5BUS0 W 0 0 0 Data Bus width 00:8bit 01:16bit 10:Reserved 11:Reserved
BEXWR1 BEXWR0
Always write "0"
Always write "0"
0: Not insert a
dummy cycle
1: Insert a
dummy cycle
00:ROM/SRAM 01:Reserved 10:Reserved 11:Reserved
BEXWR2
BEXWW2
BLOCK EX MEMC control register Low
BEXWW1
BEXWW0
BEXCSL
0158H
0 0 Write waits 001:2WAIT 010:1WAIT 101:2WAIT 110:2WAIT 011:1+NWAIT Others:Reserved
BEXOM1
W 1
0 0 Read waits 001:2WAIT 010:1WAIT 101:2WAIT 110:2WAIT 011:1+NWAIT Others:Reserved
BEXOM0 BEXBUS1 BEXBUS0
W 1
W BEXCSH
BLOCK EX MEMC control register High
0159H
-
0 Always write "0"
0 Always write "0"
0 Always write "0"
0 0 00:ROM/SRAM 01:Reserved 10:Reserved 11:Reserved OPWR0 R/W 0 0 Wait number on page
00: 1state (n-1-1-1 mode) 01: 2state (n-2-2-2 mode) 10: 3state (n-3-3-3 mode) 11: Reserved
Page ROM control register
-
-
OPGE 0
OPWR1
0 0 Data Bus width 00:8bit 01:16bit 10:Reserved 11:Reserved PR1 PR0 1 00: 64byte 01: 32byte 10: 16byte 11: 8byte 0
PMEMCR
0166H
ROM page access
Byte number in a page
0:Disable 1:Enable
92CM27 - 411
2005-04-20
TMP92CM27
Memory controller (3/3)
M0V20 MAMR0
Memory mask register 0
M0V19 1 M0S22 1 M1V20 1 M1S22 1 M2V21 1 M2S22 1 M3V21 1 M3S22 1 M4V21 1 M4S22 1 M5V21 1 M5S22 1
M0V18
M0V17 R/W
M0V16
M0V15
M0V14-9 1 M0S17 1 MV15-9 1 M1S17 1 M2V16 1 M2S17 1 M3V16 1 M3S17 1 M4V16 1 M4S17 1 M5V16 1 M5S17 1
M0V8 1 M0S16 1 M1V8 1 M1S16 1 M2V15 1 M2S16 1 M3V15 1 M3S16 1 M4V15 1 M4S16 1 M5V15 1 M5S16 1
0142H
1 M0S23
MSAR0
Memory start address register 0
0143H
1 M1V21
MAMR1
Memory mask register 1
0146H
1 M1S23
MSAR1
Memory start address register 1
0147H
1 M2V22
MAMR2
Memory mask register 2
014AH
1 M2S23
MSAR2
Memory start address register 2
014BH
1 M3V22
MAMR3
Memory mask register 3
014EH
1 M3S23
MSAR3
Memory start address register 3
014FH
1 M4V22
MAMR4
Memory mask register 4
0152H
1 M4S23
MSAR4
Memory start address register 4
0153H
1 M5V22
MAMR5
Memory mask register 5
0156H
1 M5S23
MSAR5
Memory start address register 5
0157H
1
1 1 1 1 0:Compare enable 1:Compare disable M0S21 M0S20 M0S19 M0S18 R/W 1 1 1 1 Set start address A23 to A16 M1V19 M1V18 M1V17 M1V16 R/W 1 1 1 1 0:Compare enable 1:Compare disable M1S21 M1S20 M1S19 M1S18 R/W 1 1 1 1 Set start address A23 to A16 M2V20 M2V19 M2V18 M2V17 R/W 1 1 1 1 0:Compare enable 1:Compare disable M2S21 M2S20 M2S19 M2S18 R/W 1 1 1 1 Set start address A23 to A16 M3V20 M3V19 M3V18 M3V17 R/W 1 1 1 1 0:Compare enable 1:Compare disable M3S21 M3S20 M3S19 M3S18 R/W 1 1 1 1 Set start address A23 to A16 M4V20 M4V19 M4V18 M4V17 R/W 1 1 1 1 0:Compare enable 1:Compare disable M4S21 M4S20 M4S19 M4S18 R/W 1 1 1 1 Set start address A23 to A16 M5V20 M5V19 M5V18 M5V17 R/W 1 1 1 1 0:Compare enable 1:Compare disable M5S21 M5S20 M5S19 M5S18 R/W 1 1 1 1 Set start address A23 to A16
92CM27 - 412
2005-04-20
TMP92CM27
(5) Clock control / PLL (1/2)
Symbol Name
System Clock Control 0
Address
7
6
5
4
3
SYSCR0
10E0H
2 R/W 0 Always write "0" GEAR2
1
0
0
0
SYSCR1
System Clock Control 1
10E1H
GEAR1 R/W 1 0 Select gear value of high frequency (fc) 000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 101: (Reserved) 110: (Reserved) 111: (Reserved)
HALTM0
GEAR0 0
SYSCR2
System Clock Control 2
10E2H
R/W 0 Always write "0"
WUPTM1
WUPTM0
HALTM1
DRVE
R/W 1
Warm-up timer
0
00: Reserved 01: 28/input frequency 10: 214/input frequency 11: 216/input frequency
1 1 HALT mode 00: Reserved 01: STOP mode 10: IDLE1 mode 11: IDLE2 mode
R/W 0
Pin state control in STOP mode 0: I/O off 1: Remains the state before HALT
FCSEL
PLL Control 0
LWUPFG
PLLCR0
10E8H
R/W 0
Select fc clock
R 0
Lock up timer status flag
0: fOSCH 1: fPLL
PLLON
0: not end 1: end
R/W PLLCR1
PLL Control 1
10E9H
0 Control on/off 1: ON 0: OFF
92CM27 - 413
2005-04-20
TMP92CM27
Clock control / PLL (2/2)
Symbol Name
Address
7
PROTECT
6
5
4
3
2
EXTIN
1
DRVOSCH
0
EMCCR0
EMC control register 0
10E3H
R 0
Protect flag
R/W 0
1: External fc clock
R/W 1
fc oscillator driver abillity 1: NORMAL 0: WEAK
0: OFF 1: ON
EMCCR1
EMC control register 1
10E4H Switching the protect ON/OFF by write to following 1st-KEY, 2nd-KEY 1st-KEY: EMCCR1 = 5AH, EMCCR2 = A5H in succession write 2nd-KEY: EMCCR1 = A5H, EMCCR2 = 5AH in succession write 10E5H
EMCCR2
EMC control register 2
92CM27 - 414
2005-04-20
TMP92CM27
(6) SDRAM Controller
Symbol Name address 7 0 Always write "0" 0250H 6 0 Always write "0" 5 SMRD 0
Mode register recovery time 0: 1clock 1: 2clock
4 SWRC R/W 0
Write recovery time
3 SBST 0
2 SBL1 1
00: Reserved
1 SBL0 0
0 SMAC 0
SDRAM controller 0: Disable 1: Enable
SDACR1
SDRAM Access Control Register1
Burst stop Select burst length command 0: Precharge burst write all 1: Burst stop 10:1-word read,
single write 11:Full-page read, single write 01:Full-page read,
0: 1clock 1: 2clock
SBS SDRAM Access Control Register2 0 0251H
Number of banks 0: 2 banks 1: 4 banks
SDRS1 0
SDRS0 0
SMUXW1 R/W 0
SMUXW0 0
SDACR2
Select ROW address size 00: 2048rows (11bits) 01: 4096rows (12bits) 10: 8192rows (13bits) 11: Reserved
Select address multiplex 00: TypeA (A9- ) 01: TypeB (A10- ) 10: TypeC (A11- ) 11: Reserved
SSAE SDRAM Refresh Control Register 1 0252H
SR Auto Exit 0:Disable 1:Enable
SRS2 0
SRS1 R/W 0
Refresh interval
SRS0 0
SRC 0
Auto refresh 0:Disable 1:Enable
SDRCR
000: 47state 001: 78state 010: 97state 011:124state
100:156state 101:295state 110:249state 111:312state
SCMM2 0
SCMM1 R/W 0
SCMM0 0
Command executing 000: Not execute 001: Excute initialize command a. Precharge all banks b. 8 times auto refresh c. Set mode register 100: Set mode register 101: Execute self refresh Entry 110: Execute self refresh EXIT Others: Reserved
SDRAM SDCMM Commandl Register
0253H
92CM27 - 415
2005-04-20
TMP92CM27
(7) 8-bit timer (1/2)
Symbol Name
Address
7
TA0RDE
6
5
4
3
I2TA01
2
TA01PRUN
1
TA1RUN
0
TA0RUN
TA01RUN
TMRA01 RUN register
1100H
TA0REG
TMRA0 register
1102H
(Prohibit RMW)
R/W 0 Double buffer 0: Disable 1: Enable -
0 IDLE2 0: Stop 1: Operate W Undefined -
R/W 0 0 Timer Run/Stop control 0: Stop & Clear 1: Run (count up) -
0
-
TA1REG
TMRA1 register
1103H
(Prohibit RMW)
-
-
TA01M1
TMRA01 MODE register
TA01M0
TA01MOD
1104H
0 0 Operation mode 00: 8-Bit Timer Mode 01: 16-Bit Timer Mode 10: 8-Bit PPG Mode 11: 8-Bit PWM Mode
TA1FFCR
TMRA01 Flip-Flop Conttol register
1105H
W Undefined PWM01 PWM00 TA1CLK1 TA1CLK0 R/W 0 0 0 0 PWM cycle TMRA1 source clock 00: Reserved 00: TA0TRG 01: 26 01: T1 7 10: 2 10: T16 8 11: 2 11: T256 TA1FFC1 TA1FFC0 R/W 1 1 00: Invert TA1FF 01: Set TA1FF 10: Clear TA1FF 11: Don't care
I2TA23 TA23PRUN
-
-
-
-
TA0CLK1
TA0CLK0
0 0 TMRA0 source clock 00: TA0IN input 01: T1 10: T4 11: T16 TA1FFIE TA1FFIS R/W 0 0 TA1FF TA1FF Control for Inversion select inversion 0: TMRA0 0: Disable 1: TMRA1 1: Enable
TA3RUN TA2RUN
TA2RDE
TMRA23 RUN register
TA23RUN
1108H
TA2REG
TMRA2 register
110AH
(Prohibit RMW)
R/W 0 Double buffer 0: Disable 1: Enable -
R/W 0 IDLE2 0: Stop 1: Operate W Undefined 0 0 Timer Run/Stop control 0: Stop & Clear 1: Run (count up) 0
-
TA3REG
TMRA3 register
110BH
(Prohibit RMW)
-
-
-
TA23M1
TMRA23 MODE register
TA23M0
PWM21 0 PWM cycle 00: Reserved 01: 26 10: 27 11: 28
TA23MOD
110CH
0 0 Operation mode 00: 8-Bit Timer Mode 01: 16-Bit Timer Mode 10: 8-Bit PPG Mode 11: 8-Bit PWM Mode
W Undefined PWM20 TA3CLK1 R/W 0 0
-
-
-
-
TA3CLK0 0
TA2CLK1 0
TA2CLK0 0
TMRA3 source clock
TMRA2 source clock
TA3FFCR
TMRA23 Flip-Flop Conttol register
110DH
00: TA2TRG 01: T1 10: T16 11: T256 TA3FFC1 TA3FFC0 R/W 1 1 00: Invert TA3FF 01: Set TA3FF 10: Clear TA3FF 11: Don't care
00: TA2IN input 01: T1 10: T4 11: T16 TA3FFIE TA3FFIS R/W 0 0 TA3FF TA3FF Control for Inversion select inversion 0: TMRA2 0: Disable 1: TMRA3 1: Enable
92CM27 - 416
2005-04-20
TMP92CM27
8-bit timer (2/2)
Symbol Name
Address
7
TA4RDE R/W 0 Double buffer 0: Disable 1: Enable -
6
5
4
3
I2TA45 0 IDLE2 0: Stop 1: Operate
2
TA45PRUN
1
TA5RUN 0 R/W
0
TA4RUN 0
TA45RUN
TMRA45 RUN register
0
1110H
Timer Run/Stop control 0: Stop & Clear 1: Run (count up) -
TA4REG
TMRA4 register
1112H
(Prohibit RMW)
-
-
W Undefined
-
TA5REG
TMRA5 register
1113H
(Prohibit RMW)
-
-
TA45M1
TMRA45 MODE register
TA45M0
TA45MOD
1114H
0 0 Operation mode 00: 8-Bit Timer Mode 01: 16-Bit Timer Mode 10: 8-Bit PPG Mode 11: 8-Bit PWM Mode
TA5FFCR
TMRA45 Flip-Flop Conttol register
1115H
W Undefined PWM41 PWM40 TA5CLK1 TA5CLK0 R/W 0 0 0 0 PWM cycle TMRA5 source clock 00: Reserved 00: TA4TRG 01: 26 01: T1 7 10: 2 10: T16 8 11: 2 11: T256 TA5FFC1 TA5FFC0 R/W 1 1 00: Invert TA5FF 01: Set TA5FF 10: Clear TA5FF 11: Don't care I2TA67 0 IDLE2 0: Stop 1: Operate
-
-
-
-
TA4CLK1
TA4CLK0
TA67RUN
TMRA67 RUN register
1118H
TA6REG
TMRA6 register
111AH
(Prohibit RMW)
TA6RDE R/W 0 Double buffer 0: Disable 1: Enable -
0 0 TMRA4 source clock 00: TA4IN input 01: T1 10: T4 11: T16 TA5FFIE TA5FFIS R/W 0 0 TA5FF TA5FF Control for Inversion inversion select 0: Disable 0: TMRA4 1: Enable 1: TMRA5 TA67PRUN TA7RUN TA6RUN R/W 0 0 0 Timer Run/Stop control 0: Stop & Clear 1: Run (count up) -
-
-
W Undefined
-
TA7REG
TMRA7 register
111BH
(Prohibit RMW)
-
-
TA67M1
TMRA67 MODE register
TA67M0
TA67MOD
111CH
0 0 Operation mode 00: 8-Bit Timer Mode 01: 16-Bit Timer Mode 10: 8-Bit PPG Mode 11: 8-Bit PWM Mode
TA7FFCR
TMRA67 Flip-Flop Conttol register
111DH
W Undefined PWM61 PWM60 TA7CLK1 TA7CLK0 R/W 0 0 0 0 PWM cycle TMRA7 source clock 00: Reserved 00: TA6TRG 01: 26 01: T1 7 10: 2 10: T16 8 11: 2 11: T256 TA7FFC1 TA7FFC0 R/W 1 1 00: Invert TA7FF 01: Set TA7FF 10: Clear TA7FF 11: Don't care
-
-
-
-
TA6CLK1
TA6CLK0
0 0 TMRA6 source clock 00: TA6IN input 01: T1 10: T4 11: T16 TA7FFIE TA7FFIS R/W 0 0 TA7FF TA7FF Control for Inversion inversion select 0: Disable 0: TMRA6 1: Enable 1: TMRA7
92CM27 - 417
2005-04-20
TMP92CM27
(8) 16-bit timer (1/6)
Symbol Name
Address
TB0RUN
TMRB0 RUN register
7 TB0RDE R/W 0
Double Buffer 0: Disable 1: Enable
6 - R/W 0 Always write "0"
5
4
3 I2TB0 R/W 0
IDLE2 0: Stop 1: Operate
2 TB0PRUN R/W 0
1
0 TB0RUN R/W 0
1180H
Timer Run/Stop control 0: Stop & Clear 1: Run (count up) TB0CLE R/W 0
Up counter control
TB0MOD
TMRB0 MODE register
1182H
(Prohibit RMW)
TB0CT1 TB0ET1 R/W 0 0 TB0FF1 inversion trigger 0: Disable 1: Enable Invert when Invert when capture to match UC0 with capture TB0RG1H/L register 1
TB0CP0I W 1
Software capture control 0: Software capture 1: Undefind
TB0CPM1 0
Capture timing
TB0CPM0 0
TB0CLK1 0
TB0CLK0 0
00: Disable INT4 is rising edge 01: TB0IN0, TB0IN1 INT4 is rising edge 10: TB0IN0, TB0IN0 INT4 is falling edge 11: TA1OUT, TA1OUT INT4 is rising edge
0: Disable 1: Enable
TMRB0 source clock 00:TB0IN0 pin input 01: T1 10: T4 11: T16
TB0FF1C1
TB0FF1C0
TB0C1T1
TB0C0T1
TB0E1T1
TB0E0T1
TB0FF0C1
TB0FF0C0
W*
TMRB0 Flip-Flop control register
W* 0 0 TB0FF0 inversion trigger 0: Disable 1: Enable
Invert when the UC value is loaded in to TB0CP1H/L Invert when the UC value is loaded in to TB0CP0H/L
1183H
(Prohibit RMW)
TB0FFCR
1 1 TB0FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
0
0
Invert when the UC matches with TB0RG1H/L
Invert when the UC matches with TB0RG0H/L
1 1 TB0FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
TB0RG0L
TMRB0 register 0 Low
1188H
(Prohibit RMW)
-
- W
Undefined
-
-
TB0RG0H
TMRB0 register 0 High
1189H
(Prohibit RMW)
-
-
-
- W
Undefined
-
-
-
-
TB0RG1L
TMRB0 register 1 Low
118AH
(Prohibit RMW)
-
-
-
- W
Undefined
-
-
-
-
TB0RG1H
TMRB0 register 1 High
118BH
(Prohibit RMW)
-
-
-
- W
Undefined
-
-
-
-
TB0CP0L
TMRB0 Capture register 0 Low
- 118CH - 118DH - 118EH - 118FH
-
-
- R
Undefined
-
-
-
-
TB0CP0H
TMRB0 Capture register 0 High
-
-
- R
Undefined
-
-
-
-
TB0CP1L
TMRB0 Capture register 1 Low
-
-
- R
Undefined
-
-
-
-
TB0CP1H
TMRB0 Capture register 1 High
-
-
- R
Undefined
-
-
-
-
92CM27 - 418
2005-04-20
TMP92CM27
16-bit timer (2/6)
Symbol Name
Address
TB1RUN
TMRB1 RUN register
7 TB1RDE R/W 0
Double Buffer 0: Disable 1: Enable
6 - R/W 0 Always write "0"
5
4
3 I2TB1 R/W 0
IDLE2 0: Stop 1: Operate
2 TB1PRUN R/W 0
1
0 TB1RUN R/W 0
1190H
Timer Run/Stop control 0: Stop & Clear 1: Run (count up) TB1CLE R/W 0
Up counter control
TB1MOD
TMRB1 MODE register
1192H
(Prohibit RMW)
TB1CT1 TB1ET1 R/W 0 0 TB1FF1 inversion trigger 0: Disable 1: Enable Invert when Invert when capture to match UC1 with capture TB1RG1H/L register 1
TB1CP0I W 1
Software capture control 0: Software capture 1: Undefined
TB1CPM1 0
Cature timing 00: Disable
TB1CPM0 0
TB1CLK1 0
TB1CLK0 0
INT6 is rising edge 01:TB1IN0, TB1IN1 INT6 is rising edge 10: TB1IN0, TB1IN0 INT6 is falling edge 11: TA1OUT, TA1OUT INT6 is rising edge
0: Disable 1: Enable
TMRB1 source clock 00: TB1IN0 pin input 01: T1 10: T4 11: T16
TB1FF1C1
TB1FF1C0
TB1C1T1
TB1C0T1
TB1E1T1
TB1E0T1
TB1FF0C1
TB1FF0C0
W* 1 TB1FFCR
TMRB1 Flip-Flop control register
R/W 1 0 0 TB1FF0 inversion trigger 0: Disable 1: Enable
Invert when the UC value is loaded in to TB1CP1H/L Invert when the UC value is loaded in to TB1CP0H/L
W* 0 0 1 1 TB1FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
1193H
(Prohibit RMW)
TB1FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
Invert when the UC matches with TB1RG1H/L
Invert when the UC matches with TB1RG0H/L
TB1RG0L
TMRB1 register 0 Low
1198H
(Prohibit RMW)
-
- W Undefined
-
-
TB1RG0H
TMRB1 register 0 High
1199H
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB1RG1L
TMRB1 register 1 Low
119AH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB1RG1H
TMRB1 register 1 High
119BH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB1CP0L
TMRB1 Capture register 0 Low
- 119CH - 119DH - 119EH - 119FH
-
-
- R Undefined
-
-
-
-
TB1CP0H
TMRB1 Capture register 0 High
-
-
- R Undefined
-
-
-
-
TB1CP1L
TMRB1 Capture register 1 Low
-
-
- R Undefined
-
-
-
-
TB1CP1H
TMRB1 Capture register 1 High
-
-
- R Undefined
-
-
-
-
16-bit timer (3/6)
92CM27 - 419
2005-04-20
TMP92CM27
Symbol Name
Address
TB2RUN
TMRB2 RUN register
7 TB2RDE R/W 0
Double Buffer 0: Disable 1: Enable
6 - R/W 0 Always write "0"
5
4
3 I2TB2 R/W 0
IDLE2 0: Stop 1: Operate
2 TB2PRUN R/W 0
1
0 TB2RUN R/W 0
11A0H
Timer Run/Stop control 0: Stop & Clear 1: Run (count up) TB2CLE R/W 0
Up counter control
TB2MOD
TMRB2 MODE register
11A2H
(Prohibit RMW)
TB2CT1 TB2ET1 R/W 0 0 TB2FF1 inversion trigger 0: Disable 1: Enable Invert when Invert when capture to match UC2 with capture TB2RG1H/L register 2
TB2CP0I W 1
Software capture control 0: Software capture 1: Undefined
TB2CPM1 0
Capture timing 00: Disable
TB2CPM0 0
TB2CLK1 0
TB2CLK0 0
INT8 is rising edge 01: TB2IN0, TB2IN1 INT8 is rising edge 10: TB2IN0, TB2IN0 INT8 is falling edge 11: TA3OUT, TA3OUT INT8 is rising edge
0: Disable 1: Enable
TMRB2 source clock 00: TB2IN0 pin input 01: T1 10: T4 11: T16
TB2FF1C1
TB2FF1C0
TB2C1T1
TB2C0T1
TB2E1T1
TB2E0T1
TB2FF0C1
TB2FF0C0
W* 1 TB2FFCR
TMRB2 Flip-Flop control register
R/W 1 0 0 TB2FF0 inversion trigger 0: Disable 1: Enable
Invert when the UC value is loaded in to TB2CP1H/L Invert when the UC value is loaded in to TB2CP0H/L
W* 0 0 1 1 TB2FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
11A3H
(Prohibit RMW)
TB2FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
Invert when the UC matches with TB2RG1H/L
Invert when the UC matches with TB2RG0H/L
TB2RG0L
TMRB2 register 0 Low
11A8H
(Prohibit RMW)
-
- W Undefined
-
-
TB2RG0H
TMRB2 register 0 High
11A9H
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB2RG1L
TMRB2 register 1 Low
11AAH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB2RG1H
TMRB2 register 1 High
11ABH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB2CP0L
TMRB2 Capture register Low
- 11ACH - 11ADH - 11AEH - 11AFH
-
-
- R Undefined
-
-
-
-
TB2CP0H
TMRB2 Capture register 0 High
-
-
- R Undefined
-
-
-
-
TB2CP1L
TMRB2 Capture register 1 Low
-
-
- R Undefined
-
-
-
-
TB2CP1H
TMRB2 Capture register 1 High
-
-
- R Undefined
-
-
-
-
92CM27 - 420
2005-04-20
TMP92CM27
16-bit timer (4/6)
Symbol Name
Address
TB3RUN
TMRB3 RUN register
7 TB3RDE R/W 0
Double Buffer 0: Disable 1: Enable
6 - R/W 0 Always write "0"
5
4
3 I2TB3 R/W 0
IDLE2 0: Stop 1: Operate
2 TB3PRUN R/W 0
1
0 TB3RUN R/W 0
11B0H
Timer Run/Stop control 0: Stop & Clear 1: Run (count up) TB3CLE R/W 0
Up counter control
TB3MOD
TMRB3 MODE register
11B2H
(Prohibit RMW)
TB3CT1 TB3ET1 R/W 0 0 TB3FF1 inversion trigger 0: Disable 1: Enable Invert when Invert when capture to match UC3 with capture TB3RG1H/L register 3
TB3CP0I W 1
Software capture control 0: Software capture 1: Undefined
TB3CPM1 0
Capture timing
00: Disable
TB3CPM0 0
TB3CLK1 0
TB3CLK0 0
INTA is rising edge 01:TB3IN0, TB3IN1 INTA is rising edge 10: TB3IN0, TB3IN0 INTA is falling edge 11: TA3OUT, TA3OUT INTA is riseing edge
0: Disable 1: Enable
TMRB3 source clock 00: TB3IN0 pin input 01: T1 10: T4 11: T16
TB3FF1C1
TB3FF1C0
TB3C1T1
TB3C0T1
TB3E1T1
TB3E0T1
TB3FF0C1
TB3FF0C0
W* 1 TB3FFCR
TMRB3 Flip-Flop control register
R/W 1 0 0 TB3FF0 inversion trigger 0: Disable 1: Enable
Invert when the UC value is loaded in to TB3CP1H/L Invert when the UC value is loaded in to TB3CP0H/L
W* 0 0 1 1 TB3FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
11B3H
(Prohibit RMW)
TB3FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
Invert when the UC matches with TB3RG1H/L
Invert when the UC matches with TB3RG0H/L
TB3RG0L
TMRB3 register 0 Low
11B8H
(Prohibit RMW)
-
- W Undefined
-
-
TB3RG0H
TMRB3 register 0 High
11B9H
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB3RG1L
TMRB3 register 1 Low
11BAH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB3RG1H
TMRB3 register 1 High
11BBH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB3CP0L
TMRB3 Capture register 0 Low
- 11BCH - 11BDH - 11BEH - 11BFH
-
-
- R Undefined
-
-
-
-
TB3CP0H
TMRB3 Capture register 0 High
-
-
- R Undefined
-
-
-
-
TB3CP1L
TMRB3 Capture register 1 Low
-
-
- R Undefined
-
-
-
-
TB3CP1H
TMRB3 Capture register 1 High
-
-
- R Undefined
-
-
-
-
92CM27 - 421
2005-04-20
TMP92CM27
16-bit timer (5/6)
Symbol Name
Address
TB4RUN
TMRB4 RUN register
7 TB4RDE R/W 0
Double Buffer 0: Disable 1: Enable
6 - R/W 0 Always write "0"
5
4
3 I2TB4 R/W 0
IDLE2 0: Stop 1: Operate
2 TB4PRUN R/W 0
1
0 TB4RUN R/W 0
11C0H
Timer Run/Stop control 0: Stop & Clear 1: Run (count up) TB4CLE R/W 0
Up counter
TB4MOD
TMRB4 MODE register
11C2H
(Prohibit RMW)
TB4CT1 TB4ET1 R/W 0 0 TB4FF1 inversion trigger 0: Disable 1: Enable Invert when Invert when capture to match UC4 with capture TB5RG1H/L register 4
TB4FF1C1 TB4FF1C0
TB4CP0I W 1
Software capture control 0: Software capture 1: Undefined
TB4CPM1 0
Capture timing
TB4CPM0 0
TB4CLK1 0
TB4CLK0 0
control 00: Disable 0: Disable 01: Reserved 1: Enable 10: Reserved 11: TA5OUT, TA5OUT
TMRB4 source clock 00: Reserved 01: T1 10: T4 11: T16
TB4C1T1
TB4C0T1
TB4E1T1
TB4E0T1
TB4FF0C1
TB4FF0C0
W* 1 TB4FFCR
TMRB4 Flip-Flop control register
R/W 1 0 0 TB4FF0 inversion trigger 0: Disable 1: Enable
Invert when the UC value is loaded in to TB4CP1H/L Invert when the UC value is loaded in to TB4CP0H/L
W* 0 0 1 1 TB4FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
11C3H
(Prohibit RMW)
TB4FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
Invert when the UC matches with TB4RG1H/L
Invert when the UC matches with TB4RG0H/L
11C8H TB4RG0L
TMRB4 register 0 Low (Prohibit RMW)
-
- W Undefined
-
-
TB4RG0H
TMRB4 register 0 High
11C9H
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB4RG1L
TMRB4 register 1 Low
11CAH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB4RG1H
TMRB4 register 1 High
11CBH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB4CP0L
TMRB4 Capture register 0 Low
- 11CCH - 11CDH - 11CEH - 11CFH
-
-
- R Undefined
-
-
-
-
TB4CP0H
TMRB4 Capture register 0 High
-
-
- R Undefined
-
-
-
-
TB4CP1L
TMRB4 Capture register 1 Low
-
-
- R Undefined
-
-
-
-
TB4CP1H
TMRB4 Capture register 1 High
-
-
- R Undefined
-
-
-
-
92CM27 - 422
2005-04-20
TMP92CM27
16-bit timer (6/6)
Symbol Name
Address
TB5RUN
TMRB5 RUN register
7 TB5RDE R/W 0
Double Buffer 0: Disable 1: Enable
6 - R/W 0 Always write "0"
5
4
3 I2TB5 R/W 0
IDLE2 0: Stop 1: Operate
2 TB5PRUN R/W 0
1
0 TB5RUN R/W 0
11D0H
Timer Run/Stop control 0: Stop & Clear 1: Run (count up) TB5CLE R/W 0
Up counter
TB5MOD
TMRB5 MODE register
11D2H
(Prohibit RMW)
TB5CT1 TB5ET1 R/W 0 0 TB5FF1 inversion trigger 0: Disable 1: Enable Invert when Invert when capture to match UC5 with capture TB5RG1H/L register 5
TB5FF1C1 TB5FF1C0
TB5CP0I W 1
Software capture control 0: Software capture 1: Undefined
TB5CPM1 0
Capture timing
TB5CPM0 0
TB5CLK1 0
TB5CLK0 0
control 00: Disable 0: Disable 01: Reserved 1: Enable 10: Reserved 11: TA5OUT, TA5OUT
TMRB5 source clock 00: Reserved 01: T1 10: T4 11: T16
TB5C1T1
TB5C0T1
TB5E1T1
TB5E0T1
TB5FF0C1
TB5FF0C0
W* 1 TB5FFCR
TMRB5 Flip-Flop control register
R/W 1 0 0 TB5FF0 inversion trigger 0: Disable 1: Enable
Invert when the UC value is loaded in to TB5CP1H/L Invert when the UC value is loaded in to TB5CP0H/L
W* 0 0 1 1 TB5FF0 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
11D3H
(Prohibit RMW)
TB5FF1 control 00: Invert 01: Set 10: Clear 11: Don't care * Always read as "11" - -
Invert when the UC matches with TB5RG1H/L
Invert when the UC matches with TB5RG0H/L
11D8H TB5RG0L
TMRB5 register 0 Low (Prohibit RMW)
-
- W Undefined
-
-
TB5RG0H
TMRB5 register 0 High
11D9H
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB5RG1L
TMRB5 register 1 Low
11DAH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB5RG1H
TMRB5 register 1 High
11DBH
(Prohibit RMW)
-
-
-
- W Undefined
-
-
-
-
TB5CP0L
TMRB5 Capture register 0 Low
- 11DCH - 11DDH - 11DEH - 11DFH
-
-
- R Undefined
-
-
-
-
TB5CP0H
TMRB5 Capture register 0 High
-
-
- R Undefined
-
-
-
-
TB5CP1L
TMRB5 Capture register 1 Low
-
-
- R Undefined
-
-
-
-
TB5CP1H
TMRB5 Capture register 1 High
-
-
- R Undefined
-
-
-
-
92CM27 - 423
2005-04-20
TMP92CM27
(9) Pattern Generator
PG03 1460H PG0REG
PG0 register (Prohibit RMW)
PG02 W
PG01
PG00
0 0 0 0 Pattern generation 0 (PG0) output latch register PG0 can be read by reading the port (PL) that is assigned to PG PG13 PG12 W 0 0 0 0 Pattern generation 1 (PG1) output latch register PG1 can be read by reading the port (PL) that is assigned to PG PAT1 0 CCW1 0 PG1M 0
PG1 mode (Excitation) 0: 1 step excitation or 2 step excitation 1: 1 to 2 step excitation
SA01 R/W Undefined Shift alternate register 0 for the PG mode (4-bit write) register SA11 R/W Undefined Shift alternate register 1 for the PG mode (4-bit write) register PAT0 CCW0 0 PG0M 0 SA13 SA12
SA03
SA02
SA00
PG11
PG10
SA10
1461H PG1REG
PG1 register (Prohibit RMW)
PG1TE R/W 0
PG1 trigger input enable 0: Disable 1: Enable
PG0TE 0
PG0 trigger input enable 0: Disable 1: Enable
0
PG0 write mode 0: 8-bit write 1: 4-bit write
PG01CR
PG0,1 Control register
1462H
PG1 write PG1 mode rotation 0: 8-bit write direction 1: 4-bit write 0: Normal rotation 1: Reverse rotation
PG0 mode PG0 write (Excitation) mode 0: 8-bit write 0: 1 step excitation 1: 4-bit write or 2 step excitation 1: 1 to 2 step excitation
PG1T R/W 0 PG01CR2
PG0,1 Control2 register
PG0T 0
PG0 shift trigger 0:8-bit timer trigger (TMRA01) 1:16-bit timer trigger (TMRB0)
1464H
PG1 shift trigger 0:8-bit timer trigger (TMRA23) 1:16-bit timer trigger (TMRB1)
92CM27 - 424
2005-04-20
TMP92CM27
(10) High Speed SIO (1/6)
Symbol Name
Address
7
6 XEN0 R/W 0
SYSCK 0:disable 1:enable
5
4
3
2
CLKSEL02
1
CLKSEL01
0
CLKSEL00
1
R/W 0
0
C00H
HSC0MD
High Speed Serial Channel 0 mode setting register
Select baud rate 000:Reserved 100:fsys/16 001:fsys/2 101:fsys/32 010:fsys/4 110:fsys/64 011:fsys/8 111:Reserved DOSTAT0
LOOPBACK0
MSB1ST0
TCPOL0 0
Synchrono us clock edge during transmitting 0: fall 1: rise
0 C01H
LOOPBACK teset mode
R/W 1
Start bit for transmit/rec eive
1
HSSO0 pin (no transmit)
RCPOL0 TDINV0 R/W 0 0
Synchrono us clock edge during receiving 0: fall 1: rise ALGNEN0 Invert data During transmittin g 0: disable 1: enable
RDINV0 0
Invert data During receiving 0: disable 1: enable
0:disable 1:enable
0:LSB 1:MSB
0:fixed to "0" 1:fixed to "1"
C02H 0 Always write "0"
CRC16_7_B0
R/W 1 Always write "1"
CRCRX_TX_B0
UNIT160 0
Data length 0: 8bit 1: 16bit
CRCREST_B0
0
Full duplex allgnment 0:disable 1:enable
RXWEN0 R/W 0
RXUEN0 0
HSC0CT
High Speed Serial Channel 0 control register
Sequential Receive receive UNIT 0:disable 0:disable 1:enable 1:enable DMAERFW0 DMAERFR0
0 C03H
CRC select 0:CRC7 1:CRC16
R/W 0
CRC data 0:Transmit 1:Receive
R/W 0
CRC calculate register 0:Reset 1:Release Reset
0
Micro DMA
0
Micro DMA
0: Disable 1: Enable
0: Disable 1: Enable
TEND0 1 C04H HSC0ST
High Speed Serial Channel 0 status register Transmitting 0: operation 1: no operation
REND0 R 0
Receive Shift register 0: no data 1: exist data
RFW0 1
Transmit buffer 0: untransmitted data exist 1: no untransmitted data
RFR0 0
Receive buffer 0: no valid data 1: valid data exist
C05H
CRCD007 CRCD006 CRCD005 CRCD004 CRCD003 CRCD002 CRCD001 CRCD000
C06H HSC0CR
High Speed Serial Channel 0 CRC register
R 0
CRCD015
0
CRCD014
0
CRCD013
0
CRCD012
0
CRCD011
0
CRCD010
0
CRCD009
0
CRCD008
CRC calculation result load register [7:0] C07H R 0 0 0 0 0 0 0 0 CRC calculation result load register [15:8]
92CM27 - 425
2005-04-20
TMP92CM27 High Speed SIO (2/6)
Symbol
Name
Address
7
6
5
4
3 TENDIS0 0
2 1 RENDIS0 RFWIS0 R/W 0 0
Read 0:no interrupt 1:interrupt Write 0: Don't care 1: clear Read 0:no interrupt 1:interrupt Write 0: Don't care 1: clear
0 RFRIS0 0
Read 0:no interrupt 1:interrupt Write 0: Don't care 1: clear
HSC0IS
High Speed Serial Channel 0 interrupt status register
C08H
Read 0:no interrupt 1:interrupt Write 0: Don't care 1: clear
C09H
TENDWE0
RENDWE0
RFWWE0
RFRWE0
R/W
High Speed Serial Channel 0 interrupt status write enable register
C0AH
0
Clear HSC0IS 0:disable 1:enable
0
Clear HSC0IS 0:disable 1:enable
0
Clear HSC0IS 0:disable 1:enable
0
Clear HSC0IS 0:disable 1:enable
HSC0WE
C0BH
TENDIE0
RENDIE0
RFWIE0
RFRIE0
R/W
High Speed Serial Channel 0 interupt enable register
C0CH
0
TEND0 interrupt 0:Disable 1:Enable
0
REND0 interrupt 0:Disable 1:Enable
0
RFW0 interrupt 0:Disable 1:Enable
0
RFR0 interrupt 0:Disable 1:Enable
HSC0IE
C0DH
TENDIR0
RENDIR0
RFWIR0
RFRIR0
R
High Speed Serial Channel 0 interupt request register
C0EH
0
TEND0 interrupt 0:none 1:generate
0
REND0 interrupt 0:none 1:generate
0
RFW0 interrupt 0:none 1:generate
0
RFR0 interrupt 0:none 1:generate
HSC0IR
C0FH
92CM27 - 426
2005-04-20
TMP92CM27 High Speed SIO (3/6)
TXD007 TXD006 TXD005 TXD004 TXD003 TXD002 TXD001 TXD000
C10H HSC0TD
High Speed Serial Channel 0 transmission data register
R/W 0
TXD015
0
TXD014
0
TXD013
0
TXD012
0
TXD011
0
TXD010
0
TXD009
0
TXD008
Transmission data register [7:0] C11H R 0
RXD007
0
RXD006
0
RXD005
0
RXD004
0
RXD003
0
RXD002
0
RXD001
0
RXD000
Transmission data register [15:8] C12H HSC0RD
High Speed Serial Channel 0 receiving data register
R 0
RXD015
0
RXD014
0
RXD013
0
RXD012
0
RXD011
0
RXD010
0
RXD009
0
RXD008
Receive data register [7:0] C13H R 0
TSD007
0
TSD006
0
TSD005
0
TSD004
0
TSD003
0
TSD002
0
TSD001
0
TSD000
Receive data register [15:8] C14H R 0
TSD015
HSC0TS
High Speed Serial Channel 0 transmit data shift register
0
TSD014
0
TSD013
0
TSD012
0
TSD011
0
TSD010
0
TSD009
0
TSD008
Transmit data shift register [7:0] C15H R 0
RSD007
0
RSD006
0
RSD005
0
RSD004
0
RSD003
0
RSD002
0
RSD001
0
RSD000
Transmit data shift register [15:8] C16H HSC0RS
High Speed Serial Channel 0 receive data shift register
R 0
RSD015
0
RSD014
0
RSD013
0
RSD012
0
RSD011
0
RSD010
0
RSD009
0
RSD008
Receive data shift register [7:0] C17H R 0 0 0 0 0 0 0 0 Receive data shift register [15:8]
92CM27 - 427
2005-04-20
TMP92CM27
High Speed SIO (4/6)
Symbol Name
Address
7
6 XEN1 R/W 0
SYSCK 0:disable 1:enable
5
4
3
2
CLKSEL12
1
CLKSEL11
0
CLKSEL10
1
R/W 0
0
C20H
HSC1MD
High Speed Serial Channel 1 mode setting register
Select baud rate 000:Reserved 100:fsys/16 001:fsys/2 101:fsys/32 010:fsys/4 110:fsys/64 011:fsys/8 111:Reserved DOSTAT1
LOOPBACK1
MSB1ST1
TCPOL1 0
Synchrono us clock edge during transmitting 0: fall 1: rise
0 C21H
LOOPBACK test mode
R/W 1
Start bit for transmit/rec eive
1
HSSO1 pin (no transmit)
RCPOL1 TDINV1 R/W 0 0
Synchrono us clock edge during receiving 0: fall 1: rise ALGNEN1 Invert data During transmittin g 0: disable 1: enable
RDINV1 0
Invert data During receiving 0: disable 1: enable
0:disable 1:enable
0:LSB 1:MSB
0:fixed to "0" 1:fixed to "1"
C22H 0 Always write "0"
CRC16_7_B1
R/W 1 Always write "1"
CRCRX_TX_B1
UNIT161 0
Data length 0: 8bit 1: 16bit
CRCREST_B1
0
Full duplex alignment 0:disable 1:enable
RXWEN1 R/W 0
RXUEN1 0
HSC1CT
High Speed Serial Channel 1 control register
Sequential Receive receive UNIT 0:disable 0:disable 1:enable 1:enable DMAERFW1 DMAERFR1
0 C23H
CRC select 0:CRC7 1:CRC16
R/W 0
CRC data 0:Transmit 1:Receive
R/W 0
CRC calculate register 0:Reset 1:Release Reset
0
Micro DMA
0
Micro DMA
0: Disable 1: Enable
0: Disable 1: Enable
TEND1 1 C24H HSC1ST
High Speed Serial Channel 1 status register Transmitting 0: operation 1: no operation
REND1 R 0
Receive shift register 0: no data 1: exist data
RFW1 1
Transmit buffer 0: untransmitted data exist 1: no untransmitted data
RFR1 0
Receive buffer 0: no valid data 1: valid data exist
C25H
CRCD107 CRCD106 CRCD105 CRCD104 CRCD103 CRCD102 CRCD101 CRCD100
C26H HSC1CR
High Speed Serial Channel 1 CRC register
R 0
CRCD115
0
CRCD114
0
CRCD113
0
CRCD112
0
CRCD111
0
CRCD110
0
CRCD109
0
CRCD108
CRC calculation result load register [7:0] C27H R 0 0 0 0 0 0 0 0 CRC calculation result load register [15:8]
92CM27 - 428
2005-04-20
TMP92CM27 High Speed SIO (5/6)
Symbol
Name
Address
7
6
5
4
3 TENDIS1 0
2 1 RENDIS1 RFWIS1 R/W 0 0
Read 0:no interrupt 1:interrupt Write 0: Don't care 1: clear Read 0:no interrupt 1:interrupt Write 0: Don't care 1: clear
0 RFRIS1 0
Read 0:no interrupt 1:interrupt Write 0: Don't care 1: clear
C28H HSC1IS
High Speed Serial Channel 1 interrupt status register
Read 0:no interrupt 1:interrupt Write 0: Don't care 1: clear
C29H
TENDWE1
RENDWE1
RFWWE1
RFRWE1
R/W
High Speed Serial Channel 1 interrupt status write enable
C2AH
0
Clear HSC1IS 0:Disable 1:Enable
0
Clear HSC1IS 0:Disable 1:Enable
0
Clear HSC1IS 0:Disable 1:Enable
0
Clear HSC1IS 0:Disable 1:Enable
HSC1WE
C2BH
TENDIE1
RENDIE1
RFWIE1
RFRIE1
R/W
High Speed Serial Channel 1 interrupt enable register
C2CH
0
TEND1 interupt 0:Disable 1:Enable
0
REND1 interrupt 0:Disable 1:Enable
0
RFW1 interupt 0:Disable 1:Enable
0
RFR1 interrupt 0:Disable 1:Enable
HSC1IE
C2DH
TENDIR1
RENDIR1
RFWIR1
RFRIR1
R
High Speed Serial Channel 1 interrupt request register
C2EH
0
TEND1 interrupt 0:none 1:generate
0
REND1 interrupt 0:none 1:generate
0
RFW1 interrupt 0:none 1:generate
0
RFR1 interrupt 0:none 1:generate
HSC1IR
C2FH
92CM27 - 429
2005-04-20
TMP92CM27 High Speed SIO (6/6)
TXD107 TXD106 TXD105 TXD104 TXD103 TXD102 TXD101 TXD100
C30H HSC1TD
High Speed Serial Channel 1 transmission data register
R/W 0
TXD115
0
TXD114
0
TXD113
0
TXD112
0
TXD111
0
TXD110
0
TXD109
0
TXD108
Transmission data register [7:0] C31H R 0
RXD107
0
RXD106
0
RXD105
0
RXD104
0
RXD103
0
RXD102
0
RXD101
0
RXD100
Transmission data register [15:8] C32H HSC1RD
High Speed Serial Channel 1 Receive data register
R 0
RXD115
0
RXD114
0
RXD113
0
RXD112
0
RXD111
0
RXD110
0
RXD109
0
RXD108
Receive data register [7:0] C33H R 0
TSD107
0
TSD106
0
TSD105
0
TSD104
0
TSD103
0
TSD102
0
TSD101
0
TSD100
Receive data register [15:8] C34H R 0
TSD115
HSC1TS
High Speed Serial Channel 1 transmit data shift register
0
TSD114
0
TSD113
0
TSD112
0
TSD111
0
TSD110
0
TSD109
0
TSD108
Transmit data shift register [7:0] C35H R 0
RSD107
0
RSD106
0
RSD105
0
RSD104
0
RSD103
0
RSD102
0
RSD101
0
RSD100
Transmit data shift register [15:8] C36H R 0
RSD115
HSC1RS
High Speed Serial Channel 1 receive data shift register
0
RSD114
0
RSD113
0
RSD112
0
RSD111
0
RSD110
0
RSD109
0
RSD108
Receive data shift register [7:0] C37H R 0 0 0 0 0 0 0 0 Receive data shift register [15:8]
92CM27 - 430
2005-04-20
TMP92CM27
(11)UART / Serial Channels (1/4)
Symbol SC0BUF Name
Serial Channel 0 Buffer
Address
1200H
(Prohibit RMW)
7 6 5 4 3 2 1 0 RB7 / TB7 RB6 / TB6 RB5 / TB5 RB4 / TB4 RB3 / TB3 RB2 / TB2 RB1 / TB1 RB0 / TB0 R (Receiving) / W (Transmission) Undefined RB8 R 0 EVEN R/W 0 Parity 0:Odd 1:Even 0 Parity addition 0:Disable 1:Enable PE OERR PERR FERR R (Clear 0 by reading) 0 0 0 1: Error Overrun Parity Framing SCLKS R/W 0
0:SCLK0 1:SCLK0
IOC 0
I/O interface Input clock selection
SC0CR
Serial Channel 0 control register
1201H
Received data bit8
0: Baud Rate Generator 1:SCLK0 input
TB8 0 SC0MOD0
Serial Channel 0 Mode 0 register
CTSE 0
Handshake function control
RXE 0 Receive control 0: Disable 1: Enable
WU R/W 0 Wake-up function 0:Disable 1:Enable
SM1 0
SM0 0
SC1 0
SC0 0
1202H
Transfer data bit8
Serial transmission mode
0: Disable 1: Enable Serial Channel 0 Baud Rate control register
00: I/O Interface Mode 01: 7bit UART Mode 10: 8bit UART Mode 11: 9bit UART Mode
BR0S3 BR0S2
Serial transmission clock (UART) 00: TA0TRG (TMRA01) 01: Baud Rate Generator 10: Internal clock fsys 11: External clock (SCLK0 input)
BR0ADDE
BR0CK1
BR0CK0
BR0S1
BR0S0
R/W 0 Always write "0" 0 (16-K)/16 division 0:Disable 1:Enable 0 00:T0 01:T2 10:T8 11:T32 0 0
Baud Rate Generator Input clock selection
BR0CR
1203H
0 0 0 Setting of the devided frequency 0 to F
BR0K3 BR0ADD
Serial Channel 0 K setup register
BR0K2 R/W
BR0K1
BR0K0 0
1204H
0
0 0 Sets frequency divisor "K" (Divided by N+(16-K)/16) 1 to F
SC0MOD1
Serial Channel 0 Mode 1 register
1205H
I2S0 FDPX0 R/W R/W 0 0 I/O interface IDLE2 mode 0: Stop 0: Half 1: Operate 1: Full PLSEL RXSEL 0 0
TXEN 0
RXEN 0
Receiving operation
SIR0WD3
SIR0WD2
SIR0WD1
SIR0WD0
R/W SIR0CR
Serial Channel 0 IrDA control register
0
0
0
0
1207H
Selection Receiving Transmission transmission data logic data pulse width 0: "H" pulse 0: disable 1: "L" pulse 0: 3/16 1: enable
0: disable 1: enable
1: 1/16
Select receiving effective pulse width Set effective pulse width for equal or more than 2x x (Value+1)+100ns Can be set: 1 to 14 Cannot be set: 0, 15
92CM27 - 431
2005-04-20
TMP92CM27
UART / Serial Channels (2/4)
Symbol SC1BUF Name
Serial Channel 1 Buffer register
Address
1208H
(Prohibit RMW)
7 6 5 4 3 2 1 0 RB7 / TB7 RB6 / TB6 RB5 / TB5 RB4 / TB4 RB3 / TB3 RB2 / TB2 RB1 / TB1 RB0 / TB0 R (Receiving) / W (Transmission) Undefined RB8 R 0 EVEN R/W 0 Parity 0:Odd 1:Even 0 Parity addition 0:Disable 1:Enable PE OERR PERR FERR R (Clear 0 by reading) 0 0 0 1: Error Overrun Parity Framing SCLKS R/W 0
0:SCLK1 1:SCLK1
IOC 0
I/O interface Input clock selection
SC1CR
Serial Channel 1 control register
1209H
Receive data bit8
0: Baud Rate Generator 1:SCLK1 input
TB8 0 SC1MOD0
Serial Channel 1 Mode 0 register
CTSE 0
Handshake function control
RXE 0 Receive control 0: Disable 1: Enable
WU R/W 0 Wake-up function 0:Disable 1:Enable
SM1 0
SM0 0
SC1 0
SC0 0
120AH
Transfer data bit8
Serial transmission mode
0: Disable 1: Enable Serial Channel 1 Baud Rate control register
00: I/O Interface Mode 01: 7bit UART Mode 10: 8bit UART Mode 11: 9bit UART Mode
BR1S3 BR1S2
Serial transmission clock (UART) 00: TA0TRG (TMRA01) 01: Baud Rate Generator 10: Internal clock fsys 11: External clock (SCLK1 input)
BR1ADDE
BR1CK1
BR1CK0
BR1S1
BR1S0
R/W 0 Always write "0" 0 (16-K)/16 division 0:Disable 1:Enable 0 00:T0 01:T2 10:T8 11:T32 0 0
Baud Rate Generator Input clock selection
BR1CR
120BH
0 0 0 Setting of the devided frequency 0 to F
BR1K3 BR1ADD
Serial Channel 1 K setup register
BR1K2 R/W
BR1K1
BR1K0 0
120CH
0
0 0 Sets frequency divisor "K" (Divided by N+(16-K)/16) 1 to F
SC1MOD1
Serial Channel 1 Mode 1 register
120DH
I2S1 FDPX1 R/W R/W 0 0 I/O interface IDLE2 mode 0: Stop 0: Half 1: Operate 1: Full
92CM27 - 432
2005-04-20
TMP92CM27
UART / Serial Channels (3/4)
Symbol SC2BUF Name
Serial Channel 2 Buffer register
Address
1210H
(Prohibit RMW)
7 6 5 4 3 2 1 0 RB7 / TB7 RB6 / TB6 RB5 / TB5 RB4 / TB4 RB3 / TB3 RB2 / TB2 RB1 / TB1 RB0 / TB0 R (Receiving) / W (Transmission) Undefined RB8 R 0 EVEN R/W 0 Parity 0:Odd 1:Even 0 Parity addition 0:Disable 1:Enable PE OERR PERR FERR R (Clear 0 by reading) 0 0 0 1: Error Overrun Parity Framing SCLKS R/W 0
0:SCLK2 1:SCLK2
IOC 0
I/O interface Input clock selection
SC2CR
Serial Channel 2 control register
1211H
Received data bit8
0: Baud Rate Generator 1:SCLK2 input
TB8 0 SC2MOD0
Serial Channel 2 Mode 0 register
CTSE 0
Handshake function control
RXE 0 Receive control 0: Disable 1: Enable
WU R/W 0 Wake-up function 0:Disable 1:Enable
SM1 0
SM0 0
SC1 0
SC0 0
1212H
Transfer data bit8
Serial transmission mode
0: Disable 1: Enable Serial Channel 2 Baud Rate control register
00: I/O Interface Mode 01: 7bit UART Mode 10: 8bit UART Mode 11: 9bit UART Mode
BR2S3 BR2S2
Serial transmission clock (UART) 00: TA0TRG (TMRA01) 01: Baud Rate Generator 10: Internal clock fsys 11: External clock (SCLK2 input)
BR2ADDE
BR2CK1
BR2CK0
BR2S1
BR2S0
R/W 0 Always write "0" 0 (16-K)/16 division 0:Disable 1:Enable 0 00:T0 01:T2 10:T8 11:T32 0 0
Baud Rate Generator Input clock selection
BR2CR
1213H
0 0 0 Setting of the devided frequency 0 to F
BR2K3 BR2ADD
Serial Channel 2 K setup register
BR2K2 R/W
BR2K1
BR2K0 0
1214H
0
0 0 Sets frequency divisor "K" (Divided by N+(16-K)/16) 1 to F
SC2MOD1
Serial Channel 2 Mode 1 register
1215H
I2S2 FDPX2 R/W R/W 0 0 I/O interface IDLE2 mode 0: Stop 0: Half 1: Operate 1: Full
92CM27 - 433
2005-04-20
TMP92CM27
UART / Serial Channels (4/4)
Symbol SC3BUF Name
Serial Channel 3 Buffer register
Address
1218H
(Prohibit RMW)
7 6 5 4 3 2 1 0 RB7 / TB7 RB6 / TB6 RB5 / TB5 RB4 / TB4 RB3 / TB3 RB2 / TB2 RB1 / TB1 RB0 / TB0 R (Receiving) / W (Transmission) Undefined RB8 R 0 EVEN R/W 0 Parity 0:Odd 1:Even 0 Parity addition 0:Disable 1:Enable PE OERR PERR FERR R (Clear 0 by reading) 0 0 0 1: Error Overrun Parity Framing SCLKS R/W 0
0:SCLK3 1:SCLK3
IOC 0
I/O interface input clock selection
SC3CR
Serial Channel 3 control register
1219H
Received data bit8
0: Baud Rate Generator 1:SCLK3 input
TB8 0 SC3MOD0
Serial Channel 3 Mode 0 register
CTSE 0
Handshake function control
RXE 0 Receive control 0: Disable 1: Enable
WU R/W 0 Wake-up function 0:Disable 1:Enable
SM1 0
SM0 0
SC1 0
SC0 0
121AH
Transfer data bit8
Serial transmission mode
0: Disable 1: Enable Serial Channel 3 Baud Rate control register
00: I/O Interface Mode 01: 7bit UART Mode 10: 8bit UART Mode 11: 9bit UART Mode
BR3S3 BR3S2
Serial transmission clock (UART) 00: TA0TRG (TMRA01) 01: Baud Rate Generator 10: Internal clock fsys 11: External clock (SCLK3 input)
BR3ADDE
BR3CK1
BR3CK0
BR3S1
BR3S0
R/W 0 Always write "0" 0 (16-K)/16 division 0:Disable 1:Enable 0 00:T0 01:T2 10:T8 11:T32 0 0
Baud Rate Generator Input clock selection
BR3CR
121BH
0 0 0 Setting of the devided frequency 0 to F
BR3K3 BR3ADD
Serial Channel 3 K setup Register
BR3K2 R/W
BR3K1
BR3K0 0
121CH
0
0 0 Sets frequency divisor "K" (Divided by N+(16-K)/16) 1 to F
SC3MOD1
Serial Channel 3 Mode 1 register
121DH
I2S3 FDPX3 R/W R/W 0 0 I/O interface IDLE2 mode 0: Stop 0: Half 1: Operate 1: Full
92CM27 - 434
2005-04-20
TMP92CM27
(12) I CBUS/Serial Channel(1/4)
Symbol Name
Address
2
7 BC2
6 BC1
5 BC0
4 ACK R/W 0
3
2 SCK2
1 SCK1
0
SCK0/ SWRMON
SBI0CR1
SBI0 control register 1
W 0 0 0 (no RMW) I2C mode Number of transfer bits 000:8 001:1 010:2 011:3 100:4 101:5 110:6 111:7 1240H
SBI0DBR
SBI0 Buffer register
I2C0AR
I2CBUS0 address register
W R/W 0 0 0 Acknowledge Setting of the divide value "n" mode 000:5 001:6 010:7 011:8 0:Disable 100:9 101:10 110:11 1:Enable 111:Reserved SIOS SIOINH SIOM1 SIOM0 SCK2 SCK1 SCK0 W W W 1240H 0 0 0 0 0 0 0 (no RMW) Setting of the divide value "n" Transfer Transfer Transfer mode SIO 000:4 001:5 010:6 011:7 0:Stop 0:Continue 00:8bit transmit mode 100:8 101:9 110:10 1:Start 1:Abort 10:8bit ransmit/receive 111:external clock SCK0 11:8bit receive RB7/TB7 RB6/TB6 RB5/TB5 RB4/TB4 RB3/TB3 RB2/TB2 RB1/TB1 RB0/TB0 1241H R(Receiving)/W(Transmission) (no RMW) Undefine SA6 SA5 SA4 SA3 SA2 SA1 SA0 ALS W 0 0 0 0 0 0 0 0 1242H
(no RMW)
Setting Slave address MST 0 0:Slave I2C mode 1:Master 1243H
(no RMW) SBI0 control register 2
address recognition
TRX 0 0:Receive 1:Transmit
BB 0 Start/stop generation 0:Stop 1:Start
PIN W 1 INTSBI0 interrupt 0:Request 1:Cancel
SBIM1 0
SBIM0 0
SWRST1
0:Enable 1:Disable SWRST0
Operation mode selection
SBI0CR2
1243H
(no RMW)
00:Port mode 10: SIO mode 01: I2C mode 11: Reserved SBIM1 SBIM0 W 0 0
Operation mode selection
0 0 Software reset generate write "10" and "01", then an internal reset signal is generated. W W 0 0 Always write Always write "0" "0"
SIO mode
MST 0 0:Slave I2C mode 1:Master 1243H
(no RMW) SBI0 Status register
TRX 0 0:Receive 1:transmit
BB 0 Bus status monitor 0:Free 1:Busy
PIN 1 INTSBI0 interrupt 0:request 1:Cancel
00:Port mode 10:SIO mode 01:I2C mode 11:Reserved AL R 0
Arbitration lost detection monitor 1:Detect
AAS 0
AD0 0 General call detection 1:Detect
LRB 0
Last receive bit monitor 0: "0" 1: "1"
SBI0SR
Slave address match detection monitor 1:Detect
SIOF 1243H
(no RMW)
SEF R 0
Shift status 0:Stopped 1:In progress
0
Transfer status 0:Stopped 1:In progress
SIO mode
92CM27 - 435
2005-04-20
TMP92CM27
I CBUS/Serial Channel(2/4)
Symbol Name
Address
2
7 Always write "0"
SBI0BR0
SBI0 Baud rate register 0
1244H
6 I2SBI0 R/W 0 IDLE2 0:Abort 1:Operate
5
4
3
2
1
0
SBI0BR1
SBI0 Baud rate register 1
1245H
P4EN R/W W 0 0 Clock Always control write "0" 0:Stop 1:Operate
92CM27 - 436
2005-04-20
TMP92CM27
I CBUS/Serial Channel(3/4)
Symbol Name
Address
2
7 BC2
6 BC1
5 BC0
4 ACK R/W 0
3
2 SCK2
1 SCK1
0
SCK0/ SWRMON
SBI1CR1
SBI1 control register 1
W 0 0 0 (no RMW) I2C mode Number of transfer bits 000:8 001:1 010:2 011:3 100:4 101:5 110:6 111:7 1248H
SBI1DBR
SBI0 Buffer register
I2C1AR
I2CBUS1 address register
W R/W 0 0 0 Acknowledge Setting of the divide value "n" mode 000:5 001:6 010:7 011:8 0:Disable 100:9 101:10 110:11 1:Enable 111:Reserved SIOS SIOINH SIOM1 SIOM0 SCK2 SCK1 SCK0 W W W 1248H 0 0 0 0 0 0 0 (no RMW) Setting of the divide value "n" Transfer Transfer Transfer mode SIO 000:4 001:5 010:6 011:7 0:Stop 0:Continue 00:8bit transmit mode 100:8 101:9 110:10 1:Start 1:Abort 10:8bit ransmit/receive 111:external clock SCK1 11:8bit receive RB7/TB7 RB6/TB6 RB5/TB5 RB4/TB4 RB3/TB3 RB2/TB2 RB1/TB1 RB0/TB0 1249H R(Receiving)/W(Transmission) (no RMW) Undefine SA6 SA5 SA4 SA3 SA2 SA1 SA0 ALS W 0 0 0 0 0 0 0 0 124AH
(no RMW)
Setting Slave address MST 0 0:Slave I C mode 1:Master 124BH
(no RMW)
2
Address recognition
TRX 0 0:Receive 1:Transmit
BB 0 Start/stop generation 0:Stop 1:Start
PIN W 1 INTSBI1 interrupt 0:Request 1:Cancel
SBIM1 0
SBIM0 0
SWRST1
0:Enable 1:Disable SWRST0
Operation mode selection
SBI1CR2
SBI1 control register 2
124BH
(no RMW)
00:Port mode 10: SIO mode 01: I2Cmode 11: Reserved SBIM1 SBIM0 W 0 0
Operation mode selection
0 0 Software reset generate write "10" and "01", then an internal reset signal is generated. W W 0 0 Always write Always write "0" "0"
SIO mode
MST 0 0:Slave I2C mode 1:Master 124BH
(no RMW) SBI1 Status register
TRX 0 0:Receive 1:transmit
BB 0 Bus status monitor 0:Free 1:Busy
PIN 1 INTSBI1 interrupt 0:request 1:Cancel
00:Port mode 10:SIO mode 01:I2C mode 11:Reserved AL R 0
Arbitration lost detection monitor 1:Detect
AAS 0
AD0 0 General call detection 1:Detect
LRB 0
Last receive bit monitor 0: "0" 1: "1"
SBI1SR
Slave address match detection monitor 1:Detect
SIOF 124BH
(no RMW)
SEF R 0
Shift status 0:Stopped 1:In progress
0
Transfer status 0:Stopped 1:In progress
SIO mode
92CM27 - 437
2005-04-20
TMP92CM27
I CBUS/Serial Channel(4/4)
Symbol Name
Address
2
7 Always write "0"
SBI1BR0
SBI1 Baud rate register 0
124CH
6 I2SBI1 R/W 0 IDLE2 0:Abort 1:Operate
5
4
3
2
1
0
SBI1BR1
SBI1 Baud rate register 1
124DH
P4EN R/W W 0 0 Clock Always control write "0" 0:Stop 1:Operate
92CM27 - 438
2005-04-20
TMP92CM27
(13) AD converter (1/3)
Symbol Name
Address
7 EOCF R 0
6 ADBF 0
AD conversion busy flag 0:Conversion stopped 1:Conversion in progress
5 -
4 -
3 ITM0 0
Interrupt specification in conversion channel fixed repeat mode 0:Every conversion 1:Every fourth conversion
ADMOD0
AD Mode control register 0
12B8H
AD conversion end flag 0: Conversion in progress 1: Conversion complete
R/W 0 0 Always write "0"
2 1 REPEAT SCAN R/W 0 0
Repeat mode specification 0: Single conversion 1: Repeat conversion mode Scan mode specification 0:Conversion channel fixed mode 1:Conversion channel scan mode
0 ADS 0
AD conversion start 0:Don't care 1:Start conversion Always 0 when read.
VREFON R/W 0
VREF applicatio n control 0: OFF 1: ON
I2AD R/W 0
IDLE2 0: Stop 1: Operate
R/W
-
ADCH3 0
ADCH2 R/W 0
ADCH1 0
ADCH0 0
0 0 Always write "0"
Analog input channel selection fixed / scanned
0000: AN0 / 0001: AN1 / 0010: AN2 / 0011: AN3 / 0100: AN4 / 0101: AN5 / AN0 AN0AN1 AN0AN1AN2 AN0AN1AN2AN3 AN0AN1AN2AN3 AN4 AN0AN1AN2AN3 AN4AN5 AN0AN1AN2AN3 AN4AN5AN6 AN0AN1AN2AN3 AN4AN5AN6AN7 AN0AN1AN2AN3 AN4AN5AN6AN7 AN8 AN0AN1AN2AN3 AN4AN5AN6AN7 AN8AN9 AN0AN1AN2AN3 AN4AN5AN6AN7 AN8AN9AN10 AN0AN1AN2AN3 AN4AN5AN6AN7 AN8AN9AN10AN11
ADMOD1
AD Mode control register 1
0110: AN6 /
12B9H
0111: AN7 / 1000: AN8 /
1001: AN9 /
1010: AN10/
1011: AN11/
0 Always write "0"
0 Always write "0"
0 Always write "0"
0 Always write "0"
0 Always write "0"
0 Always write "0"
0 Always write "0"
ADTRGE R/W 0
AD conversion trigger start control
ADMOD2
AD Mode control register 2
12BAH
0: disable 1: enable
92CM27 - 439
2005-04-20
TMP92CM27 AD converter (2/3)
Symbol
ADREG0L
Name
AD Result register 0 Low
Address
7 ADR01
6 ADR00
5
4
3
2
1
12A0H
ADREG0H
AD Result register 0 High
R Undefined ADR09 ADR08
ADR07
ADR06
12A1H ADR11 12A2H ADR10 R Undefined ADR19 ADR18
ADR05 R Undefined
ADR04
ADR03
0 ADR0RF R 0 ADR02
ADREG1L
AD Result register 1 Low
ADREG1H
AD Result register 1 High
ADR17
ADR16
12A3H ADR20 R Undefined ADR29 ADR28 ADR21 12A4H
ADR15 R Undefined
ADR14
ADR13
ADR1RF R 0 ADR12
ADREG2L
AD Result register 2 Low
ADREG2H
AD Result register 2 High
ADR27
ADR26
12A5H ADR31 12A6H ADR30 R Undefined ADR39 ADR38
ADR25 R Undefined
ADR24
ADR23
ADR2RF R 0 ADR22
ADREG3L
AD Result register 3 Low
ADREG3H
AD Result register 3 High
ADR37
ADR36
12A7H ADR41 12A8H ADR40 R Undefined ADR49 ADR48
ADR35 R Undefined
ADR34
ADR33
ADR3RF R 0 ADR32
ADREG4L
AD Result register 4 Low
ADREG4H
AD Result register 4 High
ADR47
ADR46
12A9H ADR50 R Undefined ADR59 ADR58 ADR51 12AAH
ADR45 R Undefined
ADR44
ADR43
ADR4RF R 0 ADR42
ADREG5L
AD Result register 5 Low
ADREG5H
AD Result register 5 High
ADR57
ADR56
12ABH ADR60 R Undefined ADR69 ADR68 ADR61 12ACH
ADR55 R Undefined
ADR54
ADR53
ADR5RF R 0 ADR52
ADREG6L
AD Result register 6 Low
ADREG6H
AD Result register 6 High
ADR67
ADR66
12ADH ADR70 R Undefined ADR79 ADR78 ADR71 12AEH
ADR65 R Undefined
ADR64
ADR63
ADR6RF R 0 ADR62
ADREG7L
AD Result register 7 Low
ADREG7H
AD Result register 7 High
ADR77
ADR76
12AFH
ADR75 R Undefined
ADR74
ADR73
ADR7RF R 0 ADR72
92CM27 - 440
2005-04-20
TMP92CM27 AD converter (3/3)
Symbol ADREG8L Name
AD Result register 8 Low
Address
7 ADR81
6 ADR80
5
4
3
2
1
12B0H
R Undefined ADR89 ADR88
ADR87
ADR86
ADREG8H
AD Result register 8 High
12B1H ADR90 R Undefined ADR99 ADR98 ADR91
ADR85 R Undefined
ADR84
ADR83
0 ADR8RF R 0 ADR82
ADREG9L
AD Result register 9 Low
12B2H
ADR97
ADR96
ADREG9H
AD Result register 9 High
12B3H ADRA0 R Undefined ADRA9 ADRA8 ADRA1
ADR95 R Undefined
ADR94
ADR93
ADR9RF R 0 ADR92
ADREGAL
AD Result register A Low
12B4H
ADRA7
ADRA6
ADREGAH
AD Result register A High
12B5H ADRB0 R Undefined ADRB9 ADRB8 ADRB1
ADRA5 R Undefined
ADRA4
ADRA3
ADRARF R 0 ADRA2
ADREGBL
AD Result register B Low
12B6H
ADRB7
ADRB6
ADREGBH
AD Result register B High
12B7H
ADRB5 R Undefined
ADRB4
ADRB3
ADRBRF R 0 ADRB2
92CM27 - 441
2005-04-20
TMP92CM27
(14) DA converter
Symbol Name
DA 0
Address
7 DAC07 0 -
6 DAC06 0 - R/W 0 Always write "0"
5 DAC05 0 - 0 Always write "0"
4 DAC04 R/W 0 - 0 Always write "0"
3 DAC03 0
2 DAC02 0
1 DAC01 0
0 DAC00 0 VALID W 0
DAC0REG register
12E0H
DA 0
0 12E1H Always write "0"
DAC0CNT1 control
register 1
DA 0
DAC0CNT0 control
register 0
12E3H
0:Don't care 1:Output CODE valid REFON0 OP0 R/W 0 0 0:Ref off 1:Ref on 0:Output High-Z 1:Output DAC10 0 VALID W 0 0:Don't care 1:Output CODE valid REFON1 OP1 R/W 0 0 0:Ref off 1:Ref on 0:Output High-Z 1:Output
DAC17 DAC1REG
DA 1 register
DAC16 0 - R/W 0 Always write "0"
DAC15 0 -
DAC14 R/W 0 -
DAC13 0
DAC12 0
DAC11 0
12E4H
0 -
DA 1
0 12E5H Always write "0"
DAC1CNT1 control
register 1
Always write "0"
Always write "0"
DA 1
DAC1CNT0 control
register 0
12E7H
92CM27 - 442
2005-04-20
TMP92CM27
(15) Watch dog timer
Symbol Name
Address
WDMOD
WDT Mode register
7 WDTE R/W 1 WDT control 1: enable
6 WDTP1 R/W 0 00: 2 /fSYS 01: 217/fSYS 10: 219/fSYS 11: 221/fSYS
15
5 WDTP0 0
4 - 0 Always write "0"
3 - 0
2 I2WDT R/W 0
1 RESCR R/W 0
0 - 0
1300H
WDT detection time
1:Internally Always IDLE2 connects write "0" 0: Stop 1: Operate WDT out to the reset pin
WDCR
WDT control register
1301H
- W - B1H: WDT disable code
4E: WDT clear code
(16) Key-on wake up
Symbol Name
Address
7 KI7EN 0 KI7 input 0:Disable 1:Enable KI7EDGE 0 KI7 edge 0:Rising 1:Falling
6 KI6EN
5 KI5EN
4 KI4EN
3 KI3EN
2 KI2EN
1 KI1EN
0 KI0EN 0 KI0 input 0:Disable 1:Enable KI0EDGE 0 KI0 edge 0:Rising 1:Falling
KIEN
KeyInput Enable setup register
009EH
(Prohibit RMW)
KICR
Key Input control register
009FH
(Prohibit RMW)
W 0 0 0 0 KI6 input KI5 input KI4 input KI3 input 0:Disable 0:Disable 0:Disable 0:Disable 1:Enable 1:Enable 1:Enable 1:Enable KI6EDGE KI5EDGE KI4EDGE KI3EDGE W 0 0 0 0 KI6 edge KI5 edge KI4 edge KI3 edge 0:Rising 0:Rising 0:Rising 0:Rising 1:Falling 1:Falling 1:Falling 1:Falling
0 0 KI2 input KI1 input 0:Disable 0:Disable 1:Enable 1:Enable KI2EDGE KI1EDGE 0 KI2 edge 0:Rising 1:Falling 0 KI1 edge 0:Rising 1:Falling
92CM27 - 443
2005-04-20
TMP92CM27
6.
Points of Note and Restrictions
(1) Notation a. b. The notation for built-in/ I/O registers is as follows register symbol (e.g., TA01RUN denotes bit TA0RUN of register TA01RUN). Read-modify-write instructions An instruction in which the CPU reads data from memory and writes the data to the same memory location in one instruction. Example 1: Example 2: * SET INC 3, (TA01RUN) ... Set bit 3 of TA01RUN. 1, (100H) ... Increment the data at 100H.
Examples of read-modify-write instructions on the TLCS-900 Exchange instruction EX (mem), R
Arithmetic operations ADD SUB INC (mem), R/# (mem), R/# #3, (mem) ADC SBC DEC (mem), R/# (mem), R/# #3, (mem)
Logic operations AND XOR (mem), R/# (mem), R/# OR (mem), R/#
Bit manipulation operations STCF SET TSET #3/A, (mem) #3, (mem) #3, (mem) RES CHG #3, (mem) #3, (mem)
Rotate and shift operations RLC RL SLA SLL RLD c. (mem) (mem) (mem) (mem) (mem) RRC RR SRA SRL RRD (mem) (mem) (mem) (mem) (mem)
fc, fs, fFPH, fSYS and one state The clock frequency input on X1 and 2 is called fOSCH. The clock selected by PLLCR0 is called fc. The clock selected by SYSCR1 is called fFPH. The clock frequency give by fFPH divided by 2 is called fSYS. One cycle of fSYS is referred to as one state.
92CM27-444
2005-04-20
TMP92CM27
(2) Points of note a. AM0 and AM1 pins This pin is connected to the VCC or the VSS pin. Do not alter the level when the pin is active. b. Reserved address areas Since the 16 byte area of FFFFF0H FFFFFFH is reserved as internal area, use of it is impossible. Moreover, when using an emulator, since it is used for control of an emulator, 64K bytes with arbitrary 16M byte area of use cannot be performed. c. Warm-up counter The warm-up counter operates when STOP mode is released, even if the system is using an external oscillator. As a result a time equivalent to the warm-up time elapses between input of the release request and output of the system clock. d. Watchdog timer The watchdog timer starts operation immediately after a reset is released. When the watchdog timer is not to be used, disable it. e. AD converter The string resistor between the VREFH and VREFL pins can be cut by a program so as to reduce power consumption. When STOP mode is used, disable the resistor using the program before the HALT instruction is executed. f. CPU (Micro DMA) Only the "LDC cr, r" and "LDC r, cr" instructions can be used to access the control registers in the CPU (e.g., the transfer source address register (DMASn)). g. h. i. Undefined SFR The value of an undefined bit in an SFR is undefined when read. POP SR instruction Please execute the POP SR instruction during DI condition. Interrupt When you use interruption, be sure to set "1" as the bit 7 of a SIMC register.
92CM27-445
2005-04-20
TMP92CM27
7.
Package Dimensions
Package Name: P-LQFP144-1616-0.40C Unit:mm
92CM27-446
2005-04-20


▲Up To Search▲   

 
Price & Availability of TMP92CM27

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X